bfd/
[deliverable/binutils-gdb.git] / bfd / elf32-h8300.c
index 547adfaa93591b38c7e6ed8baae60d090f0d631a..c933f40d41551983945b4e7e70777eb3f13d6d63 100644 (file)
@@ -439,28 +439,11 @@ elf32_h8_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
        }
       else
        {
-         h = sym_hashes[r_symndx - symtab_hdr->sh_info];
-         while (h->root.type == bfd_link_hash_indirect
-                || h->root.type == bfd_link_hash_warning)
-           h = (struct elf_link_hash_entry *) h->root.u.i.link;
-         if (h->root.type == bfd_link_hash_defined
-             || h->root.type == bfd_link_hash_defweak)
-           {
-             sec = h->root.u.def.section;
-             relocation = (h->root.u.def.value
-                           + sec->output_section->vma
-                           + sec->output_offset);
-           }
-         else if (h->root.type == bfd_link_hash_undefweak)
-           relocation = 0;
-         else
-           {
-             if (! ((*info->callbacks->undefined_symbol)
-                    (info, h->root.root.string, input_bfd,
-                     input_section, rel->r_offset, TRUE)))
-               return FALSE;
-             relocation = 0;
-           }
+         bfd_boolean unresolved_reloc, warned;
+
+         RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr,
+                                  relocation, sec, unresolved_reloc,
+                                  info, warned);
        }
 
       r = elf32_h8_final_link_relocate (r_type, input_bfd, output_bfd,
This page took 0.025438 seconds and 4 git commands to generate.