This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: powerpc new PLT and GOT

On Thu, May 19, 2005 at 10:30:46PM +0930, Alan Modra wrote:
> This should be close to the final version.

That sort of comment is really tempting fate.  :-)  libffi and nested
function trampoline assembly needed fixing.  Also, a means of making the
compiler default to the new plt layout (which is also the easiest way to
ensure libraries are all built with new plt).

This patch survives bootstrap and regression testing all languages bar
ada.  I'll admit that most of the testing has been done against the
gcc-4.0 branch, with mainline bootstrap only against an older glibc.
The gcc-4.0 patch has been tested using both old and new versions of
glibc, with good result on both gcc and glibc testsuites.  One libstdc++
test, abi-check, fails with a new glibc.  Symbol differences are all
std::moneypunct<char, false>::_M_initialize_moneypunct(__locale_struct*, char const*)
std::moneypunct<char, false>::_M_initialize_moneypunct(int*, char const*)
I think this is due to a libstdc++ configure test failing, probably
because I didn't get all the rpath magic right when trying to use the
new glibc.  ie. this was a failure of my test setup rather than a real

Some notes on the patch:

I chose to use --enable-dataplt as a configure option to make the
compiler default to -mdata-plt.  This needs documenting (and the new
ppc -mdata-plt and -mbss-plt options).  I'll do that before committing,
assuming --enable-dataplt is a reasonable choice.  Another possibility
is --with-abi=data-plt or even a new powerpc config target (but I think
we already have way too many ppc targets).

Moving the elf_high and elf_low patterns seemed the easiest way to allow 
load_toc_v4_PIC_3c to generate "addi" rather than the rtl matching
elf_low and generating "cal", not that this really matters.  Note that
the comment above elf_high and elf_low is incorrect.  They aren't just
used for non-PIC.

OK to apply mainline?

Alan Modra
IBM OzLabs - Linux Technology Centre

Attachment: gcc.diff
Description: Text document

Attachment: gcc4.diff
Description: Text document

Attachment: gcc34.diff
Description: Text document

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]