* elf32-arm.c (arm_build_one_stub): Use the hash entry of the
authorJulian Brown <julian@codesourcery.com>
Fri, 10 Jul 2009 14:57:00 +0000 (14:57 +0000)
committerJulian Brown <julian@codesourcery.com>
Fri, 10 Jul 2009 14:57:00 +0000 (14:57 +0000)
symbol a stub entry is derived from, not the entry for the stub
itself, in call to elf32_arm_final_link_relocate.

bfd/ChangeLog
bfd/elf32-arm.c

index 349516130667059fda53b4fe2f7cae2517850abc..2fed91d6675953d8d6e0dfbf764d4718fb9d0e30 100644 (file)
@@ -1,3 +1,9 @@
+2009-07-10  Julian Brown  <julian@codesourcery.com>
+
+       * elf32-arm.c (arm_build_one_stub): Use the hash entry of the
+       symbol a stub entry is derived from, not the entry for the stub
+       itself, in call to elf32_arm_final_link_relocate.
+
 2009-07-10  H.J. Lu  <hongjiu.lu@intel.com>
 
        * elf.c (_bfd_elf_get_synthetic_symtab): Remove leading zeros
index 2d53304e4e3593e5f4798865e421145557a8f34c..bb45587c0da7dfea8b582278dc07c9cf24cb7f6e 100644 (file)
@@ -3549,6 +3549,9 @@ arm_build_one_stub (struct bfd_hash_entry *gen_entry,
             branch.  */
          points_to = sym_value;
 
+       /* There may be unintended consequences if this is not true.  */
+       BFD_ASSERT (stub_entry->h == NULL);
+
        /* Note: _bfd_final_link_relocate doesn't handle these relocations
           properly.  We should probably use this function unconditionally,
           rather than only for certain relocations listed in the enclosing
@@ -3557,7 +3560,7 @@ arm_build_one_stub (struct bfd_hash_entry *gen_entry,
            (template[stub_reloc_idx[i]].r_type),
          stub_bfd, info->output_bfd, stub_sec, stub_sec->contents, &rel,
          points_to, info, stub_entry->target_section, "", sym_flags,
-         (struct elf_link_hash_entry *) stub_entry, &unresolved_reloc,
+         (struct elf_link_hash_entry *) stub_entry->h, &unresolved_reloc,
          &error_message);
       }
     else
This page took 0.034544 seconds and 4 git commands to generate.