mn10300 dynamic relocation clean up: remove dynamic PCREL32

Alexandre Oliva aoliva@redhat.com
Sun Jun 27 02:59:00 GMT 2004


We used to generate a very large number of dynamic R_MN10300_NONE
relocations while linking libc.so and ld.so in glibc.  As it turns
out, this was because we had accounted for dynamic relocations to be
generated for PC-relative relocations that were never needed, but the
code to get rid of them didn't work for some reason I didn't get to
investigate.  I figured R_MN10300_PCREL32 were never specified as
dynamic relocations in the shared-library ABI extension; I just
implemented them because it looked easy enough and it sounded like a
good idea.  I no longer think it is: it just makes it easier to create
libraries with TEXTREL relocations if you happen to compile code with
calls without @PLT annotations.  I tried building glibc after removing
support for this dynamic relocation, and glibc shared libraries still
linked.  So I went ahead and made sure non-dynamic relocs never
referenced symbols that didn't bind locally, and still no problems,
which is great.  This patch is the result of the changes.  I'm
checking it in.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mn10300-bfd-no-dynamic-pcrel-relocs.patch
Type: text/x-patch
Size: 12320 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20040627/98735bea/attachment.bin>
-------------- next part --------------

-- 
Alexandre Oliva             http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}


More information about the Binutils mailing list