2000-10-16 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
+ * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
+ of a GOT reloc.
+
* elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
(SYMBOL_CALLS_LOCAL): New macro.
(ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
off &= ~1;
else
{
- bfd_put_64 (output_bfd, relocation, sgot->contents + off);
local_got_offsets[r_symndx] |= 1;
if (info->shared)
asection *srelgot;
Elf_Internal_Rela outrel;
+ /* The Solaris 2.7 64-bit linker adds the contents
+ of the location to the value of the reloc.
+ Note this is different behaviour to the
+ 32-bit linker, which both adds the contents
+ and ignores the addend. So clear the location. */
+ bfd_put_64 (output_bfd, 0, sgot->contents + off);
+
/* We need to generate a R_SPARC_RELATIVE reloc
for the dynamic linker. */
srelgot = bfd_get_section_by_name(dynobj, ".rela.got");
+ srelgot->reloc_count));
++srelgot->reloc_count;
}
+ else
+ bfd_put_64 (output_bfd, relocation, sgot->contents + off);
}
relocation = sgot->output_offset + off - got_base;
}