+2002-12-18 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
+ code a little. Comment on dynamic relocs against section symbols.
+
2002-12-17 Roger Sayle <roger@eyesopen.com>
* configure.host (ia64-*-hpux*): Support 64 bit targets using
}
else
{
+ outrel.r_addend = relocation + rel->r_addend;
+
if (r_type == R_PPC_ADDR32)
- {
- outrel.r_info = ELF32_R_INFO (0, R_PPC_RELATIVE);
- outrel.r_addend = relocation + rel->r_addend;
- }
+ outrel.r_info = ELF32_R_INFO (0, R_PPC_RELATIVE);
else
{
long indx;
== bfd_link_hash_defweak));
sec = h->root.u.def.section;
}
- if (sec != NULL && bfd_is_abs_section (sec))
+
+ if (bfd_is_abs_section (sec))
indx = 0;
else if (sec == NULL || sec->owner == NULL)
{
{
asection *osec;
+ /* We are turning this relocation into one
+ against a section symbol. It would be
+ proper to subtract the symbol's value,
+ osec->vma, from the emitted reloc addend,
+ but ld.so expects buggy relocs. */
osec = sec->output_section;
indx = elf_section_data (osec)->dynindx;
BFD_ASSERT (indx > 0);
}
outrel.r_info = ELF32_R_INFO (indx, r_type);
- outrel.r_addend = relocation + rel->r_addend;
}
}