PATCH: ARM Symbian OS .rel.plt relocations
Mark Mitchell
mark@codesourcery.com
Tue Oct 12 20:51:00 GMT 2004
The ARM Symbian OS linker was creating .rel.plt entries that used
offsets relative to the PLT, rather than virtual addresses as required
by the BPABI.
OK?
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
2004-10-12 Mark Mitchell <mark@codesourcery.com>
* elf32-arm.h (elf32_arm_finish_dynamic_symbol): Make .rel.plt
relocations use a virtual address, not a section offset.
Index: elf32-arm.h
===================================================================
RCS file: /cvs/src/src/bfd/elf32-arm.h,v
retrieving revision 1.139
diff -c -5 -p -r1.139 elf32-arm.h
*** elf32-arm.h 6 Sep 2004 20:55:22 -0000 1.139
--- elf32-arm.h 12 Oct 2004 20:47:11 -0000
*************** elf32_arm_finish_dynamic_symbol (bfd * o
*** 3705,3715 ****
bfd_put_32 (output_bfd,
elf32_arm_symbian_plt_entry[i],
splt->contents + h->plt.offset + 4 * i);
/* Fill in the entry in the .rel.plt section. */
! rel.r_offset = (splt->output_offset
+ h->plt.offset + 4 * (i - 1));
rel.r_info = ELF32_R_INFO (h->dynindx, R_ARM_GLOB_DAT);
}
else
{
--- 3705,3716 ----
bfd_put_32 (output_bfd,
elf32_arm_symbian_plt_entry[i],
splt->contents + h->plt.offset + 4 * i);
/* Fill in the entry in the .rel.plt section. */
! rel.r_offset = (splt->output_section->vma
! + splt->output_offset
+ h->plt.offset + 4 * (i - 1));
rel.r_info = ELF32_R_INFO (h->dynindx, R_ARM_GLOB_DAT);
}
else
{
More information about the Binutils
mailing list