[committed] fix DF_TEXTREL addition on mips
Eric Christopher
echristo@redhat.com
Thu Mar 24 11:51:00 GMT 2005
For mips after my cfi changes we were occasionally emitting DF_TEXTREL
when, in fact, we weren't generating the relocation at all. This was
giving glibc all sorts of headaches according to the comments from
Daniel :)
The best bet is to delay determining whether or not to set DF_TEXTREL
until we've actually emitted the relocation into the object file.
I've committed this to mainline now and will commit to the 2.16 branch
in a couple of days if I haven't broken anything else by accident.
Tested on mips-elf mips-linux-gnu mips-sgi-irix without regressions.
Tested with gcc for mips-elf and mips64-elf without regressions (though
those aren't a good test).
As a note this code should probably be cleaned up.
-eric
bfd/ChangeLog:
2005-03-23 Eric Christopher <echristo@redhat.com>
* elfxx-mips.c (MIPS_ELF_READONLY_SECTION): New.
(mips_elf_calculate_relocation): Use. Define DF_TEXTREL
after emitting relocation.
(_bfd_mips_elf_adjust_dynamic_symbol): Ditto.
(_bfd_mips_elf_check_relocs): Remove code to set DF_TEXTREL
and readonly_reloc.
ld/testsuite/ChangeLog:
2005-03-23 Eric Christopher <echristo@redhat.com>
* ld-mips-elf/textrel-1.s, ld-mips-elf/textrel-1.d: New
test.
* ld-mips-elf/mips-elf.exp: Call it.
* ld-mips-elf/rel32-n32.d: Update for DF_TEXTREL removal.
* ld-mips-elf/rel32-o32.d: Ditto.
* ld-mips-elf/rel64.d: Ditto.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: textrel.diff
Type: text/x-patch
Size: 8713 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20050324/2617bae9/attachment.bin>
More information about the Binutils
mailing list