aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2004-04-02 15:26:04 +0000
committerH.J. Lu <hjl.tools@gmail.com>2004-04-02 15:26:04 +0000
commita4d7b4b5183e729792e7645a798ace0aa22eff39 (patch)
tree2fefc701dfd20357d33f8999022b5b242ca6f14c
parent1f433d93ad63424103d5b3c08d44e6eaff234293 (diff)
downloadgdb-a4d7b4b5183e729792e7645a798ace0aa22eff39.zip
gdb-a4d7b4b5183e729792e7645a798ace0aa22eff39.tar.gz
gdb-a4d7b4b5183e729792e7645a798ace0aa22eff39.tar.bz2
2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
* elf32-cr16c.c (elf32_cr16c_relocate_section): Use RELOC_FOR_GLOBAL_SYMBOL. (elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf32-cr16c.c29
2 files changed, 13 insertions, 22 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index b54be88..6d2b7fc 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,11 @@
2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
+ * elf32-cr16c.c (elf32_cr16c_relocate_section): Use
+ RELOC_FOR_GLOBAL_SYMBOL.
+ (elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
+
+2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
+
* elf32-arm.h (elf32_arm_final_link_relocate): Handle
R_ARM_ALU* only if OLD_ARM_ABI is not defined.
diff --git a/bfd/elf32-cr16c.c b/bfd/elf32-cr16c.c
index 3e2e275..e722335 100644
--- a/bfd/elf32-cr16c.c
+++ b/bfd/elf32-cr16c.c
@@ -721,27 +721,12 @@ elf32_cr16c_relocate_section (bfd *output_bfd,
}
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 (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ h, sec, relocation,
+ unresolved_reloc, warned);
}
r = cr16c_elf_final_link_relocate (howto, input_bfd, output_bfd,
@@ -944,7 +929,7 @@ elf32_cr16c_symbol_processing (bfd *abfd ATTRIBUTE_UNUSED,
static bfd_boolean
elf32_cr16c_add_symbol_hook (bfd *abfd,
struct bfd_link_info *info ATTRIBUTE_UNUSED,
- const Elf_Internal_Sym *sym,
+ Elf_Internal_Sym *sym,
const char **namep ATTRIBUTE_UNUSED,
flagword *flagsp ATTRIBUTE_UNUSED,
asection **secp,