Date: Fri, 11 Mar 2011 20:00:38 +0000 (UTC) From: Marius Strobl <marius@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/contrib/binutils/bfd elfxx-sparc.c Message-ID: <201103112000.p2BK0kxt048590@repoman.freebsd.org>
index | next in thread | raw e-mail
marius 2011-03-11 20:00:38 UTC
FreeBSD src repository
Modified files:
contrib/binutils/bfd elfxx-sparc.c
Log:
SVN rev 219530 on 2011-03-11 20:00:38Z by marius
In the upstream rev. 1.61 of elf64-sparc.c the following bug was fixed:
* elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
dynamic relocs against section symbols for the output section vma.
However, with the addition of TLS support in the upstream rev. 1.104
this fix was essentially reverted. After factoring out the common parts
of elf32-sparc.c and elf64-sparc.c a comment was added to elfxx-sparc.c
in the upstream rev. 1.27 as part of unrelated changes, saying that the
fix from elf64-sparc.c rev. 1.61 indeed should be implemented, but given
that some unspecified OS has a broken ld.so expecting broken relocations
deliberately is omitted.
As the current behavior actually violates the SPARC ABI, FreeBSD never
had such a broken ld.so and this is actually causing problems with at
least kernel modules linked with binutils 2.17.50 committed in r218822
without the workaround committed in r219340 in place, re-implement the
above fix in a way so that is only applied if the output format is
ELFOSABI_FREEBSD. In the upstream version it probably would make sense
to invert this check and only skip adjusting the addend for the OS with
the broken ld.so, once it's determine which one that is.
Approved by: dim
Revision Changes Path
1.2 +11 -5 src/contrib/binutils/bfd/elfxx-sparc.c
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201103112000.p2BK0kxt048590>
