This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[PATCH] elf64-ppc.c *r_offset patch tweak
Hi!
A few lines below if (indx == 0) does outrel.r_addend + relocation,
so we are storing different content into *r_offset than will actually
be in r_addend of a RELATIVE reloc against .got.
With this patch plus a glibc patch to be posted ASAP (and glibc rebuilt
using patched binutils) current prelink finally passes all tests on ppc64.
Ok to commit?
2003-06-17 Jakub Jelinek <jakub@redhat.com>
* elf64-ppc.c (ppc64_elf_relocation_section): Ensure
*r_offset == r_addend for RELATIVE relocs against .got.
--- elf64-ppc.c 17 Jun 2003 09:10:41 -0000 1.104
+++ elf64-ppc.c 17 Jun 2003 11:49:19 -0000
@@ -7970,7 +7970,8 @@ ppc64_elf_relocate_section (output_bfd,
/* Write the .got section contents for the sake
of prelink. */
loc = htab->sgot->contents + off;
- bfd_put_64 (output_bfd, outrel.r_addend, loc);
+ bfd_put_64 (output_bfd, outrel.r_addend + relocation,
+ loc);
}
else
outrel.r_info = ELF64_R_INFO (indx, R_PPC64_GLOB_DAT);
Jakub