* elf32-arm.h (elf32_arm_finish_dynamic_symbol): Make .rel.plt
authorMark Mitchell <mark@codesourcery.com>
Wed, 13 Oct 2004 03:09:28 +0000 (03:09 +0000)
committerMark Mitchell <mark@codesourcery.com>
Wed, 13 Oct 2004 03:09:28 +0000 (03:09 +0000)
relocations use a virtual address, not a section offset.

bfd/ChangeLog
bfd/elf32-arm.h

index 0ba2f6ce8d0e5b816aed9ac5b0679d9cad17ad87..a820851869b0e5df2cc0064667bdb92f6e2bb7db 100644 (file)
@@ -1,3 +1,8 @@
+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.
+
 2004-10-12  Bob Wilson  <bob.wilson@acm.org>
 
        * elf32-xtensa.c (elf_xtensa_get_private_bfd_flags): Delete.
index c51cdeb1a50f2df23dbc6848bccb3fd024e4beae..a74004d033dd8aeb02f918df75704fd281b2ac56 100644 (file)
@@ -3853,7 +3853,8 @@ elf32_arm_finish_dynamic_symbol (bfd * output_bfd, struct bfd_link_info * info,
                        splt->contents + h->plt.offset + 4 * i);
          
          /* Fill in the entry in the .rel.plt section.  */
-         rel.r_offset = (splt->output_offset
+         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);
        }