aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bfd/ChangeLog78
-rw-r--r--bfd/aoutx.h14
-rw-r--r--bfd/coff-a29k.c8
-rw-r--r--bfd/coff-alpha.c6
-rw-r--r--bfd/coff-arm.c7
-rw-r--r--bfd/coff-h8300.c21
-rw-r--r--bfd/coff-h8500.c6
-rw-r--r--bfd/coff-i960.c7
-rw-r--r--bfd/coff-mcore.c2
-rw-r--r--bfd/coff-mips.c6
-rw-r--r--bfd/coff-or32.c8
-rw-r--r--bfd/coff-ppc.c4
-rw-r--r--bfd/coff-rs6000.c7
-rw-r--r--bfd/coff-sh.c7
-rw-r--r--bfd/coff-tic80.c7
-rw-r--r--bfd/coff-w65.c6
-rw-r--r--bfd/coff-z8k.c12
-rw-r--r--bfd/coff64-rs6000.c7
-rw-r--r--bfd/cofflink.c9
-rw-r--r--bfd/ecoff.c2
-rw-r--r--bfd/elf-hppa.h34
-rw-r--r--bfd/elf-m10200.c5
-rw-r--r--bfd/elf-m10300.c5
-rw-r--r--bfd/elf32-arm.h5
-rw-r--r--bfd/elf32-avr.c7
-rw-r--r--bfd/elf32-cr16c.c5
-rw-r--r--bfd/elf32-cris.c4
-rw-r--r--bfd/elf32-crx.c5
-rw-r--r--bfd/elf32-d10v.c5
-rw-r--r--bfd/elf32-fr30.c8
-rw-r--r--bfd/elf32-frv.c4
-rw-r--r--bfd/elf32-h8300.c5
-rw-r--r--bfd/elf32-hppa.c4
-rw-r--r--bfd/elf32-i370.c3
-rw-r--r--bfd/elf32-i386.c5
-rw-r--r--bfd/elf32-i860.c4
-rw-r--r--bfd/elf32-ip2k.c4
-rw-r--r--bfd/elf32-iq2000.c4
-rw-r--r--bfd/elf32-m32r.c4
-rw-r--r--bfd/elf32-m68hc1x.c2
-rw-r--r--bfd/elf32-m68k.c5
-rw-r--r--bfd/elf32-mcore.c6
-rw-r--r--bfd/elf32-msp430.c5
-rw-r--r--bfd/elf32-openrisc.c4
-rw-r--r--bfd/elf32-ppc.c1
-rw-r--r--bfd/elf32-s390.c5
-rw-r--r--bfd/elf32-sh.c7
-rw-r--r--bfd/elf32-sparc.c7
-rw-r--r--bfd/elf32-v850.c5
-rw-r--r--bfd/elf32-vax.c7
-rw-r--r--bfd/elf32-xstormy16.c4
-rw-r--r--bfd/elf64-alpha.c7
-rw-r--r--bfd/elf64-mmix.c4
-rw-r--r--bfd/elf64-ppc.c3
-rw-r--r--bfd/elf64-s390.c5
-rw-r--r--bfd/elf64-sh64.c7
-rw-r--r--bfd/elf64-sparc.c7
-rw-r--r--bfd/elf64-x86-64.c5
-rw-r--r--bfd/elflink.c3
-rw-r--r--bfd/elfxx-ia64.c8
-rw-r--r--bfd/elfxx-mips.c5
-rw-r--r--bfd/linker.c2
-rw-r--r--bfd/pdp11.c9
-rw-r--r--bfd/reloc.c3
-rw-r--r--bfd/simple.c1
-rw-r--r--bfd/xcofflink.c2
-rw-r--r--include/ChangeLog6
-rw-r--r--include/bfdlink.h14
-rw-r--r--ld/ChangeLog7
-rw-r--r--ld/ldmain.c32
70 files changed, 356 insertions, 176 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index b640031..f561ab9 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,81 @@
+2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR 463
+ * aoutx.h (aout_link_input_section_std): Pass proper hash entry
+ to linker reloc_overflow callback.
+ (aout_link_input_section_ext): Likewise.
+ (aout_link_reloc_link_order): Likewise.
+ * coff-a29k.c (coff_a29k_relocate_section): Likewise.
+ * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
+ Likewise.
+ (alpha_relocate_section): Likewise.
+ * coff-arm.c (coff_arm_relocate_section): Likewise.
+ * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
+ * coff-h8500.c (extra_case): Likewise.
+ * coff-i960.c (coff_i960_relocate_section): Likewise.
+ * coff-mcore.c (coff_mcore_relocate_section): Likewise.
+ * coff-mips.c (mips_relocate_section): Likewise.
+ * coff-or32.c (coff_or32_relocate_section): Likewise.
+ * coff-ppc.c (coff_ppc_relocate_section): Likewise.
+ * coff-rs6000.c (xcoff_ppc_relocate_section): Likewise.
+ * coff-sh.c (sh_relocate_section): Likewise.
+ * coff-tic80.c (coff_tic80_relocate_section): Likewise.
+ * coff-w65.c (w65_reloc16_extra_cases): Likewise.
+ * coff-z8k.c (extra_case): Likewise.
+ * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
+ * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
+ (_bfd_coff_generic_relocate_section): Likewise.
+ * ecoff.c (ecoff_reloc_link_order): Likewise.
+ * elf-hppa.h (elf_hppa_relocate_section): Likewise.
+ * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
+ * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
+ * elf32-arm.h (elf32_arm_relocate_section): Likewise.
+ * elf32-avr.c (elf32_avr_relocate_section): Likewise.
+ * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
+ * elf32-cris.c (cris_elf_relocate_section): Likewise.
+ * elf32-crx.c (elf32_crx_relocate_section): Likewise.
+ * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
+ * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
+ * elf32-frv.c (elf32_frv_relocate_section): Likewise.
+ * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
+ * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
+ * elf32-i370.c (i370_elf_relocate_section): Likewise.
+ * elf32-i386.c (elf_i386_relocate_section): Likewise.
+ * elf32-i860.c (elf32_i860_relocate_section): Likewise.
+ * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
+ * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
+ * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
+ * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
+ * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
+ * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
+ * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
+ * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
+ * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
+ * elf32-s390.c (elf_s390_relocate_section): Likewise.
+ * elf32-sh.c (sh_elf_relocate_section): Likewise.
+ * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
+ * elf32-v850.c (v850_elf_relocate_section): Likewise.
+ * elf32-vax.c (elf_vax_relocate_section): Likewise.
+ * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
+ * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
+ * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
+ * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
+ * elf64-s390.c (elf_s390_relocate_section): Likewise.
+ * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
+ * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
+ * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
+ * elflink.c (elf_reloc_link_order): Likewise.
+ * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
+ * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
+ (_bfd_elf_mips_get_relocated_section_contents): Likewise.
+ * linker.c (_bfd_generic_reloc_link_order): Likewise.
+ * pdp11.c (pdp11_aout_link_input_section): Likewise.
+ (aout_link_reloc_link_order): Likewise.
+ * reloc.c (bfd_generic_get_relocated_section_contents):
+ Likewise.
+ * xcofflink.c (xcoff_reloc_link_order): Likewise.
+ * simple.c (simple_dummy_reloc_overflow): Updated.
+
2004-10-20 Andreas Schwab <schwab@suse.de>
* elf32-m68k.c (elf_m68k_plt_sym_val): New function.
diff --git a/bfd/aoutx.h b/bfd/aoutx.h
index 4fa529c..d629d80 100644
--- a/bfd/aoutx.h
+++ b/bfd/aoutx.h
@@ -5158,7 +5158,7 @@ aout_link_input_section_std (finfo, input_bfd, input_section, relocs,
const char *name;
if (h != NULL)
- name = h->root.root.string;
+ name = NULL;
else if (r_extern)
name = strings + GET_WORD (input_bfd,
syms[r_index].e_strx);
@@ -5170,8 +5170,9 @@ aout_link_input_section_std (finfo, input_bfd, input_section, relocs,
name = bfd_section_name (input_bfd, s);
}
if (! ((*finfo->info->callbacks->reloc_overflow)
- (finfo->info, name, howto->name,
- (bfd_vma) 0, input_bfd, input_section, r_addr)))
+ (finfo->info, (h ? &h->root : NULL), name,
+ howto->name, (bfd_vma) 0, input_bfd,
+ input_section, r_addr)))
return FALSE;
}
break;
@@ -5569,7 +5570,7 @@ aout_link_input_section_ext (finfo, input_bfd, input_section, relocs,
const char *name;
if (h != NULL)
- name = h->root.root.string;
+ name = NULL;
else if (r_extern
|| r_type == (unsigned int) RELOC_BASE10
|| r_type == (unsigned int) RELOC_BASE13
@@ -5584,7 +5585,8 @@ aout_link_input_section_ext (finfo, input_bfd, input_section, relocs,
name = bfd_section_name (input_bfd, s);
}
if (! ((*finfo->info->callbacks->reloc_overflow)
- (finfo->info, name, howto_table_ext[r_type].name,
+ (finfo->info, (h ? &h->root : NULL), name,
+ howto_table_ext[r_type].name,
r_addend, input_bfd, input_section, r_addr)))
return FALSE;
}
@@ -5753,7 +5755,7 @@ aout_link_reloc_link_order (finfo, o, p)
abort ();
case bfd_reloc_overflow:
if (! ((*finfo->info->callbacks->reloc_overflow)
- (finfo->info,
+ (finfo->info, NULL,
(p->type == bfd_section_reloc_link_order
? bfd_section_name (finfo->output_bfd,
pr->u.section)
diff --git a/bfd/coff-a29k.c b/bfd/coff-a29k.c
index 444dbc2..a78eb93 100644
--- a/bfd/coff-a29k.c
+++ b/bfd/coff-a29k.c
@@ -532,7 +532,7 @@ coff_a29k_relocate_section (output_bfd, info, input_bfd, input_section,
if (symndx == -1)
name = "*ABS*";
else if (h != NULL)
- name = h->root.root.string;
+ name = NULL;
else if (sym == NULL)
name = "*unknown*";
else if (sym->_n._n_n._n_zeroes == 0
@@ -546,9 +546,9 @@ coff_a29k_relocate_section (output_bfd, info, input_bfd, input_section,
}
if (! ((*info->callbacks->reloc_overflow)
- (info, name, howto_table[rel->r_type].name, (bfd_vma) 0,
- input_bfd, input_section,
- rel->r_vaddr - input_section->vma)))
+ (info, (h ? &h->root : NULL), name,
+ howto_table[rel->r_type].name, (bfd_vma) 0, input_bfd,
+ input_section, rel->r_vaddr - input_section->vma)))
return FALSE;
}
}
diff --git a/bfd/coff-alpha.c b/bfd/coff-alpha.c
index 2acb800..68dd765 100644
--- a/bfd/coff-alpha.c
+++ b/bfd/coff-alpha.c
@@ -1145,7 +1145,8 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
break;
case bfd_reloc_overflow:
if (! ((*link_info->callbacks->reloc_overflow)
- (link_info, bfd_asymbol_name (*rel->sym_ptr_ptr),
+ (link_info, NULL,
+ bfd_asymbol_name (*rel->sym_ptr_ptr),
rel->howto->name, rel->addend, input_bfd,
input_section, rel->address)))
goto error_return;
@@ -1960,7 +1961,8 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
name = bfd_section_name (input_bfd,
symndx_to_section[r_symndx]);
if (! ((*info->callbacks->reloc_overflow)
- (info, name, alpha_howto_table[r_type].name,
+ (info, NULL, name,
+ alpha_howto_table[r_type].name,
(bfd_vma) 0, input_bfd, input_section,
r_vaddr - input_section->vma)))
return FALSE;
diff --git a/bfd/coff-arm.c b/bfd/coff-arm.c
index 1c3a7e3..05229ca 100644
--- a/bfd/coff-arm.c
+++ b/bfd/coff-arm.c
@@ -1795,7 +1795,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
if (symndx == -1)
name = "*ABS*";
else if (h != NULL)
- name = h->root.root.string;
+ name = NULL;
else
{
name = _bfd_coff_internal_syment_name (input_bfd, sym, buf);
@@ -1804,8 +1804,9 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
}
if (! ((*info->callbacks->reloc_overflow)
- (info, name, howto->name, (bfd_vma) 0, input_bfd,
- input_section, rel->r_vaddr - input_section->vma)))
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_vaddr - input_section->vma)))
return FALSE;
}
}
diff --git a/bfd/coff-h8300.c b/bfd/coff-h8300.c
index 4cd8829..0e07fb1 100644
--- a/bfd/coff-h8300.c
+++ b/bfd/coff-h8300.c
@@ -685,7 +685,8 @@ h8300_reloc16_extra_cases (bfd *abfd, struct bfd_link_info *link_info,
if (gap < -128 || gap > 126)
{
if (! ((*link_info->callbacks->reloc_overflow)
- (link_info, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+ (link_info, NULL,
+ bfd_asymbol_name (*reloc->sym_ptr_ptr),
reloc->howto->name, reloc->addend, input_section->owner,
input_section, reloc->address)))
abort ();
@@ -716,7 +717,8 @@ h8300_reloc16_extra_cases (bfd *abfd, struct bfd_link_info *link_info,
if (gap > 32766 || gap < -32768)
{
if (! ((*link_info->callbacks->reloc_overflow)
- (link_info, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+ (link_info, NULL,
+ bfd_asymbol_name (*reloc->sym_ptr_ptr),
reloc->howto->name, reloc->addend, input_section->owner,
input_section, reloc->address)))
abort ();
@@ -805,7 +807,8 @@ h8300_reloc16_extra_cases (bfd *abfd, struct bfd_link_info *link_info,
else
{
if (! ((*link_info->callbacks->reloc_overflow)
- (link_info, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+ (link_info, NULL,
+ bfd_asymbol_name (*reloc->sym_ptr_ptr),
reloc->howto->name, reloc->addend, input_section->owner,
input_section, reloc->address)))
abort ();
@@ -828,7 +831,8 @@ h8300_reloc16_extra_cases (bfd *abfd, struct bfd_link_info *link_info,
if (gap < -128 || gap > 126)
{
if (! ((*link_info->callbacks->reloc_overflow)
- (link_info, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+ (link_info, NULL,
+ bfd_asymbol_name (*reloc->sym_ptr_ptr),
reloc->howto->name, reloc->addend, input_section->owner,
input_section, reloc->address)))
abort ();
@@ -874,7 +878,8 @@ h8300_reloc16_extra_cases (bfd *abfd, struct bfd_link_info *link_info,
if (gap < -128 || gap > 126)
{
if (! ((*link_info->callbacks->reloc_overflow)
- (link_info, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+ (link_info, NULL,
+ bfd_asymbol_name (*reloc->sym_ptr_ptr),
reloc->howto->name, reloc->addend, input_section->owner,
input_section, reloc->address)))
abort ();
@@ -1073,7 +1078,8 @@ h8300_reloc16_extra_cases (bfd *abfd, struct bfd_link_info *link_info,
if (gap < -128 || gap > 126)
{
if (! ((*link_info->callbacks->reloc_overflow)
- (link_info, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+ (link_info, NULL,
+ bfd_asymbol_name (*reloc->sym_ptr_ptr),
reloc->howto->name, reloc->addend, input_section->owner,
input_section, reloc->address)))
abort ();
@@ -1155,7 +1161,8 @@ h8300_reloc16_extra_cases (bfd *abfd, struct bfd_link_info *link_info,
else
{
if (! ((*link_info->callbacks->reloc_overflow)
- (link_info, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+ (link_info, NULL,
+ bfd_asymbol_name (*reloc->sym_ptr_ptr),
reloc->howto->name, reloc->addend, input_section->owner,
input_section, reloc->address)))
abort ();
diff --git a/bfd/coff-h8500.c b/bfd/coff-h8500.c
index a94e4a3..3c5cf22 100644
--- a/bfd/coff-h8500.c
+++ b/bfd/coff-h8500.c
@@ -254,7 +254,8 @@ extra_case (in_abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr)
if (gap > 128 || gap < -128)
{
if (! ((*link_info->callbacks->reloc_overflow)
- (link_info, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+ (link_info, NULL,
+ bfd_asymbol_name (*reloc->sym_ptr_ptr),
reloc->howto->name, reloc->addend, input_section->owner,
input_section, reloc->address)))
abort ();
@@ -277,7 +278,8 @@ extra_case (in_abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr)
if (gap > 32767 || gap < -32768)
{
if (! ((*link_info->callbacks->reloc_overflow)
- (link_info, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+ (link_info, NULL,
+ bfd_asymbol_name (*reloc->sym_ptr_ptr),
reloc->howto->name, reloc->addend, input_section->owner,
input_section, reloc->address)))
abort ();
diff --git a/bfd/coff-i960.c b/bfd/coff-i960.c
index 3a04753..62b8a92 100644
--- a/bfd/coff-i960.c
+++ b/bfd/coff-i960.c
@@ -555,7 +555,7 @@ coff_i960_relocate_section (output_bfd, info, input_bfd, input_section,
if (symndx == -1)
name = "*ABS*";
else if (h != NULL)
- name = h->root.root.string;
+ name = NULL;
else
{
name = _bfd_coff_internal_syment_name (input_bfd, sym, buf);
@@ -564,8 +564,9 @@ coff_i960_relocate_section (output_bfd, info, input_bfd, input_section,
}
if (! ((*info->callbacks->reloc_overflow)
- (info, name, howto->name, (bfd_vma) 0, input_bfd,
- input_section, rel->r_vaddr - input_section->vma)))
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_vaddr - input_section->vma)))
return FALSE;
}
}
diff --git a/bfd/coff-mcore.c b/bfd/coff-mcore.c
index 7e0b28c..865e398 100644
--- a/bfd/coff-mcore.c
+++ b/bfd/coff-mcore.c
@@ -556,7 +556,7 @@ coff_mcore_relocate_section (output_bfd, info, input_bfd, input_section,
case bfd_reloc_overflow:
if (! ((*info->callbacks->reloc_overflow)
- (info, my_name, howto->name,
+ (info, (h ? &h->root : NULL), my_name, howto->name,
(bfd_vma) 0, input_bfd,
input_section, rel->r_vaddr - input_section->vma)))
return FALSE;
diff --git a/bfd/coff-mips.c b/bfd/coff-mips.c
index 39f7f22..d89db54 100644
--- a/bfd/coff-mips.c
+++ b/bfd/coff-mips.c
@@ -1261,12 +1261,12 @@ mips_relocate_section (output_bfd, info, input_bfd, input_section,
const char *name;
if (int_rel.r_extern)
- name = h->root.root.string;
+ name = NULL;
else
name = bfd_section_name (input_bfd, s);
if (! ((*info->callbacks->reloc_overflow)
- (info, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section,
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
int_rel.r_vaddr - input_section->vma)))
return FALSE;
}
diff --git a/bfd/coff-or32.c b/bfd/coff-or32.c
index b21cdf3..af30afd 100644
--- a/bfd/coff-or32.c
+++ b/bfd/coff-or32.c
@@ -545,7 +545,7 @@ coff_or32_relocate_section (output_bfd, info, input_bfd, input_section,
if (symndx == -1)
name = "*ABS*";
else if (h != NULL)
- name = h->root.root.string;
+ name = NULL;
else if (sym == NULL)
name = "*unknown*";
else if (sym->_n._n_n._n_zeroes == 0
@@ -559,9 +559,9 @@ coff_or32_relocate_section (output_bfd, info, input_bfd, input_section,
}
if (! ((*info->callbacks->reloc_overflow)
- (info, name, howto_table[rel->r_type].name, (bfd_vma) 0,
- input_bfd, input_section,
- rel->r_vaddr - input_section->vma)))
+ (info, (h ? &h->root : NULL), name,
+ howto_table[rel->r_type].name, (bfd_vma) 0, input_bfd,
+ input_section, rel->r_vaddr - input_section->vma)))
return FALSE;
}
}
diff --git a/bfd/coff-ppc.c b/bfd/coff-ppc.c
index 38d0099..28d7985 100644
--- a/bfd/coff-ppc.c
+++ b/bfd/coff-ppc.c
@@ -1563,7 +1563,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
if (symndx == -1)
name = "*ABS*";
else if (h != NULL)
- name = h->root.root.root.string;
+ name = NULL;
else if (sym == NULL)
name = "*unknown*";
else if (sym->_n._n_n._n_zeroes == 0
@@ -1577,7 +1577,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
}
if (! ((*info->callbacks->reloc_overflow)
- (info, name, howto->name,
+ (info, (h ? &h->root.root : NULL), name, howto->name,
(bfd_vma) 0, input_bfd,
input_section, rel->r_vaddr - input_section->vma)))
return FALSE;
diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c
index d1df0a2..1257fbb 100644
--- a/bfd/coff-rs6000.c
+++ b/bfd/coff-rs6000.c
@@ -3481,7 +3481,7 @@ xcoff_ppc_relocate_section (output_bfd, info, input_bfd,
}
else if (h != NULL)
{
- name = h->root.root.string;
+ name = NULL;
}
else
{
@@ -3492,8 +3492,9 @@ xcoff_ppc_relocate_section (output_bfd, info, input_bfd,
sprintf (reloc_type_name, "0x%02x", rel->r_type);
if (! ((*info->callbacks->reloc_overflow)
- (info, name, reloc_type_name, (bfd_vma) 0, input_bfd,
- input_section, rel->r_vaddr - input_section->vma)))
+ (info, (h ? &h->root : NULL), name, reloc_type_name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_vaddr - input_section->vma)))
return FALSE;
}
diff --git a/bfd/coff-sh.c b/bfd/coff-sh.c
index ce9ae94..93d0da1 100644
--- a/bfd/coff-sh.c
+++ b/bfd/coff-sh.c
@@ -2946,7 +2946,7 @@ sh_relocate_section (output_bfd, info, input_bfd, input_section, contents,
if (symndx == -1)
name = "*ABS*";
else if (h != NULL)
- name = h->root.root.string;
+ name = NULL;
else if (sym->_n._n_n._n_zeroes == 0
&& sym->_n._n_n._n_offset != 0)
name = obj_coff_strings (input_bfd) + sym->_n._n_n._n_offset;
@@ -2958,8 +2958,9 @@ sh_relocate_section (output_bfd, info, input_bfd, input_section, contents,
}
if (! ((*info->callbacks->reloc_overflow)
- (info, name, howto->name, (bfd_vma) 0, input_bfd,
- input_section, rel->r_vaddr - input_section->vma)))
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_vaddr - input_section->vma)))
return FALSE;
}
}
diff --git a/bfd/coff-tic80.c b/bfd/coff-tic80.c
index 50f4304..30da206 100644
--- a/bfd/coff-tic80.c
+++ b/bfd/coff-tic80.c
@@ -695,7 +695,7 @@ coff_tic80_relocate_section (output_bfd, info, input_bfd,
if (symndx == -1)
name = "*ABS*";
else if (h != NULL)
- name = h->root.root.string;
+ name = NULL;
else
{
name = _bfd_coff_internal_syment_name (input_bfd, sym, buf);
@@ -704,8 +704,9 @@ coff_tic80_relocate_section (output_bfd, info, input_bfd,
}
if (! ((*info->callbacks->reloc_overflow)
- (info, name, howto->name, (bfd_vma) 0, input_bfd,
- input_section, rel->r_vaddr - input_section->vma)))
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_vaddr - input_section->vma)))
return FALSE;
}
}
diff --git a/bfd/coff-w65.c b/bfd/coff-w65.c
index 63634b7..cbc2179 100644
--- a/bfd/coff-w65.c
+++ b/bfd/coff-w65.c
@@ -324,7 +324,8 @@ w65_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
if (gap < -128 || gap > 127)
{
if (! ((*link_info->callbacks->reloc_overflow)
- (link_info, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+ (link_info, NULL,
+ bfd_asymbol_name (*reloc->sym_ptr_ptr),
reloc->howto->name, reloc->addend, input_section->owner,
input_section, reloc->address)))
abort ();
@@ -348,7 +349,8 @@ w65_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr,
if ((gap & 0xf0000) != (dot & 0xf0000))
{
if (! ((*link_info->callbacks->reloc_overflow)
- (link_info, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+ (link_info, NULL,
+ bfd_asymbol_name (*reloc->sym_ptr_ptr),
reloc->howto->name, reloc->addend, input_section->owner,
input_section, reloc->address)))
abort ();
diff --git a/bfd/coff-z8k.c b/bfd/coff-z8k.c
index cf4da77..5fd09e0 100644
--- a/bfd/coff-z8k.c
+++ b/bfd/coff-z8k.c
@@ -233,7 +233,8 @@ extra_case (bfd *in_abfd,
if (gap > 128 || gap < -128)
{
if (! ((*link_info->callbacks->reloc_overflow)
- (link_info, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+ (link_info, NULL,
+ bfd_asymbol_name (*reloc->sym_ptr_ptr),
reloc->howto->name, reloc->addend, input_section->owner,
input_section, reloc->address)))
abort ();
@@ -261,7 +262,8 @@ extra_case (bfd *in_abfd,
if (gap > 0 || gap < -127)
{
if (! ((*link_info->callbacks->reloc_overflow)
- (link_info, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+ (link_info, NULL,
+ bfd_asymbol_name (*reloc->sym_ptr_ptr),
reloc->howto->name, reloc->addend, input_section->owner,
input_section, reloc->address)))
abort ();
@@ -288,7 +290,8 @@ extra_case (bfd *in_abfd,
if (gap > 4096 || gap < -4095)
{
if (! ((*link_info->callbacks->reloc_overflow)
- (link_info, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+ (link_info, NULL,
+ bfd_asymbol_name (*reloc->sym_ptr_ptr),
reloc->howto->name, reloc->addend, input_section->owner,
input_section, reloc->address)))
abort ();
@@ -314,7 +317,8 @@ extra_case (bfd *in_abfd,
if (gap > 32767 || gap < -32768)
{
if (! ((*link_info->callbacks->reloc_overflow)
- (link_info, bfd_asymbol_name (*reloc->sym_ptr_ptr),
+ (link_info, NULL,
+ bfd_asymbol_name (*reloc->sym_ptr_ptr),
reloc->howto->name, reloc->addend, input_section->owner,
input_section, reloc->address)))
abort ();
diff --git a/bfd/coff64-rs6000.c b/bfd/coff64-rs6000.c
index b33658a..c4dd1d8 100644
--- a/bfd/coff64-rs6000.c
+++ b/bfd/coff64-rs6000.c
@@ -1335,7 +1335,7 @@ xcoff64_ppc_relocate_section (output_bfd, info, input_bfd,
}
else if (h != NULL)
{
- name = h->root.root.string;
+ name = NULL;
}
else
{
@@ -1346,8 +1346,9 @@ xcoff64_ppc_relocate_section (output_bfd, info, input_bfd,
sprintf (reloc_type_name, "0x%02x", rel->r_type);
if (! ((*info->callbacks->reloc_overflow)
- (info, name, reloc_type_name, (bfd_vma) 0, input_bfd,
- input_section, rel->r_vaddr - input_section->vma)))
+ (info, (h ? &h->root : NULL), name, reloc_type_name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_vaddr - input_section->vma)))
return FALSE;
}
diff --git a/bfd/cofflink.c b/bfd/cofflink.c
index ca144cc..c277b85 100644
--- a/bfd/cofflink.c
+++ b/bfd/cofflink.c
@@ -2735,7 +2735,7 @@ _bfd_coff_reloc_link_order (bfd *output_bfd,
abort ();
case bfd_reloc_overflow:
if (! ((*finfo->info->callbacks->reloc_overflow)
- (finfo->info,
+ (finfo->info, NULL,
(link_order->type == bfd_section_reloc_link_order
? bfd_section_name (output_bfd,
link_order->u.reloc.p->u.section)
@@ -3016,7 +3016,7 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd,
if (symndx == -1)
name = "*ABS*";
else if (h != NULL)
- name = h->root.root.string;
+ name = NULL;
else
{
name = _bfd_coff_internal_syment_name (input_bfd, sym, buf);
@@ -3025,8 +3025,9 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd,
}
if (! ((*info->callbacks->reloc_overflow)
- (info, name, howto->name, (bfd_vma) 0, input_bfd,
- input_section, rel->r_vaddr - input_section->vma)))
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_vaddr - input_section->vma)))
return FALSE;
}
}
diff --git a/bfd/ecoff.c b/bfd/ecoff.c
index b94de12..74306f1 100644
--- a/bfd/ecoff.c
+++ b/bfd/ecoff.c
@@ -4697,7 +4697,7 @@ ecoff_reloc_link_order (output_bfd, info, output_section, link_order)
abort ();
case bfd_reloc_overflow:
if (! ((*info->callbacks->reloc_overflow)
- (info,
+ (info, NULL,
(link_order->type == bfd_section_reloc_link_order
? bfd_section_name (output_bfd, section)
: link_order->u.reloc.p->u.name),
diff --git a/bfd/elf-hppa.h b/bfd/elf-hppa.h
index a6d3d69..415ad30 100644
--- a/bfd/elf-hppa.h
+++ b/bfd/elf-hppa.h
@@ -1338,7 +1338,6 @@ elf_hppa_relocate_section (bfd *output_bfd,
asection *sym_sec;
bfd_vma relocation;
bfd_reloc_status_type r;
- const char *sym_name;
const char *dyn_name;
char *dynh_buf = NULL;
size_t dynh_buflen = 0;
@@ -1463,19 +1462,6 @@ elf_hppa_relocate_section (bfd *output_bfd,
}
}
- if (h != NULL)
- sym_name = h->root.root.string;
- else
- {
- sym_name = bfd_elf_string_from_elf_section (input_bfd,
- symtab_hdr->sh_link,
- sym->st_name);
- if (sym_name == NULL)
- return FALSE;
- if (*sym_name == '\0')
- sym_name = bfd_section_name (input_bfd, sym_sec);
- }
-
r = elf_hppa_final_link_relocate (rel, input_bfd, output_bfd,
input_section, contents,
relocation, info, sym_sec,
@@ -1489,9 +1475,25 @@ elf_hppa_relocate_section (bfd *output_bfd,
abort ();
case bfd_reloc_overflow:
{
+ const char *sym_name;
+
+ if (h != NULL)
+ sym_name = NULL;
+ else
+ {
+ sym_name = bfd_elf_string_from_elf_section (input_bfd,
+ symtab_hdr->sh_link,
+ sym->st_name);
+ if (sym_name == NULL)
+ return FALSE;
+ if (*sym_name == '\0')
+ sym_name = bfd_section_name (input_bfd, sym_sec);
+ }
+
if (!((*info->callbacks->reloc_overflow)
- (info, sym_name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset)))
+ (info, (h ? &h->root : NULL), sym_name,
+ howto->name, (bfd_vma) 0, input_bfd,
+ input_section, rel->r_offset)))
return FALSE;
}
break;
diff --git a/bfd/elf-m10200.c b/bfd/elf-m10200.c
index c9e32be..7fb4475 100644
--- a/bfd/elf-m10200.c
+++ b/bfd/elf-m10200.c
@@ -410,8 +410,9 @@ mn10200_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
case bfd_reloc_overflow:
if (! ((*info->callbacks->reloc_overflow)
- (info, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset)))
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_offset)))
return FALSE;
break;
diff --git a/bfd/elf-m10300.c b/bfd/elf-m10300.c
index d882eb4..4470387 100644
--- a/bfd/elf-m10300.c
+++ b/bfd/elf-m10300.c
@@ -1510,8 +1510,9 @@ mn10300_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
case bfd_reloc_overflow:
if (! ((*info->callbacks->reloc_overflow)
- (info, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset)))
+ (info, (h ? &h->root.root : NULL), name,
+ howto->name, (bfd_vma) 0, input_bfd,
+ input_section, rel->r_offset)))
return FALSE;
break;
diff --git a/bfd/elf32-arm.h b/bfd/elf32-arm.h
index 88636d2..0d9ae49 100644
--- a/bfd/elf32-arm.h
+++ b/bfd/elf32-arm.h
@@ -2265,8 +2265,9 @@ elf32_arm_relocate_section (bfd * output_bfd,
if ((! h ||
h->root.type != bfd_link_hash_undefined)
&& (!((*info->callbacks->reloc_overflow)
- (info, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset))))
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_offset))))
return FALSE;
break;
diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c
index 06e398b..1026bfb 100644
--- a/bfd/elf32-avr.c
+++ b/bfd/elf32-avr.c
@@ -736,7 +736,7 @@ elf32_avr_relocate_section (output_bfd, info, input_bfd, input_section,
struct elf_link_hash_entry * h;
bfd_vma relocation;
bfd_reloc_status_type r;
- const char * name = NULL;
+ const char * name;
int r_type;
/* This is a final link. */
@@ -765,6 +765,8 @@ elf32_avr_relocate_section (output_bfd, info, input_bfd, input_section,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
unresolved_reloc, warned);
+
+ name = h->root.root.string;
}
r = avr_final_link_relocate (howto, input_bfd, input_section,
@@ -778,7 +780,8 @@ elf32_avr_relocate_section (output_bfd, info, input_bfd, input_section,
{
case bfd_reloc_overflow:
r = info->callbacks->reloc_overflow
- (info, name, howto->name, (bfd_vma) 0,
+ (info, (h ? &h->root : NULL),
+ name, howto->name, (bfd_vma) 0,
input_bfd, input_section, rel->r_offset);
break;
diff --git a/bfd/elf32-cr16c.c b/bfd/elf32-cr16c.c
index e722335..8c579e5 100644
--- a/bfd/elf32-cr16c.c
+++ b/bfd/elf32-cr16c.c
@@ -754,8 +754,9 @@ elf32_cr16c_relocate_section (bfd *output_bfd,
{
case bfd_reloc_overflow:
if (!((*info->callbacks->reloc_overflow)
- (info, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset)))
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_offset)))
return FALSE;
break;
diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c
index f0c88dc..ad93071 100644
--- a/bfd/elf32-cris.c
+++ b/bfd/elf32-cris.c
@@ -1357,8 +1357,8 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
case bfd_reloc_overflow:
r = info->callbacks->reloc_overflow
- (info, symname, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset);
+ (info, (h ? &h->root : NULL), symname, howto->name,
+ (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
break;
case bfd_reloc_undefined:
diff --git a/bfd/elf32-crx.c b/bfd/elf32-crx.c
index 79b9c64..50d2ea1 100644
--- a/bfd/elf32-crx.c
+++ b/bfd/elf32-crx.c
@@ -868,8 +868,9 @@ elf32_crx_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
{
case bfd_reloc_overflow:
if (!((*info->callbacks->reloc_overflow)
- (info, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset)))
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_offset)))
return FALSE;
break;
diff --git a/bfd/elf32-d10v.c b/bfd/elf32-d10v.c
index e845a25..87ae582 100644
--- a/bfd/elf32-d10v.c
+++ b/bfd/elf32-d10v.c
@@ -547,8 +547,9 @@ elf32_d10v_relocate_section (output_bfd, info, input_bfd, input_section,
{
case bfd_reloc_overflow:
if (!((*info->callbacks->reloc_overflow)
- (info, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset)))
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_offset)))
return FALSE;
break;
diff --git a/bfd/elf32-fr30.c b/bfd/elf32-fr30.c
index 5f70e3f..3cf8745 100644
--- a/bfd/elf32-fr30.c
+++ b/bfd/elf32-fr30.c
@@ -532,7 +532,7 @@ fr30_elf_relocate_section (output_bfd, info, input_bfd, input_section,
struct elf_link_hash_entry *h;
bfd_vma relocation;
bfd_reloc_status_type r;
- const char *name = NULL;
+ const char *name;
int r_type;
r_type = ELF32_R_TYPE (rel->r_info);
@@ -572,6 +572,8 @@ fr30_elf_relocate_section (output_bfd, info, input_bfd, input_section,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
unresolved_reloc, warned);
+
+ name = h->root.root.string;
}
r = fr30_final_link_relocate (howto, input_bfd, input_section,
@@ -585,8 +587,8 @@ fr30_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
case bfd_reloc_overflow:
r = info->callbacks->reloc_overflow
- (info, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset);
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
break;
case bfd_reloc_undefined:
diff --git a/bfd/elf32-frv.c b/bfd/elf32-frv.c
index 53deac7..9564671 100644
--- a/bfd/elf32-frv.c
+++ b/bfd/elf32-frv.c
@@ -2544,8 +2544,8 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
{
case bfd_reloc_overflow:
r = info->callbacks->reloc_overflow
- (info, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset);
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
break;
case bfd_reloc_undefined:
diff --git a/bfd/elf32-h8300.c b/bfd/elf32-h8300.c
index 3daef62..d4deac6 100644
--- a/bfd/elf32-h8300.c
+++ b/bfd/elf32-h8300.c
@@ -477,8 +477,9 @@ elf32_h8_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
{
case bfd_reloc_overflow:
if (! ((*info->callbacks->reloc_overflow)
- (info, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset)))
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_offset)))
return FALSE;
break;
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c
index dbe6d06..00fd990 100644
--- a/bfd/elf32-hppa.c
+++ b/bfd/elf32-hppa.c
@@ -3819,8 +3819,8 @@ elf32_hppa_relocate_section (bfd *output_bfd,
else
{
if (!((*info->callbacks->reloc_overflow)
- (info, sym_name, howto->name, 0, input_bfd, input_section,
- rel->r_offset)))
+ (info, (h ? &h->elf.root : NULL), sym_name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section, rel->r_offset)))
return FALSE;
}
}
diff --git a/bfd/elf32-i370.c b/bfd/elf32-i370.c
index 18d4a25..f4cd9c1 100644
--- a/bfd/elf32-i370.c
+++ b/bfd/elf32-i370.c
@@ -1438,7 +1438,7 @@ i370_elf_relocate_section (output_bfd, info, input_bfd, input_section,
const char *name;
if (h != NULL)
- name = h->root.root.string;
+ name = NULL;
else
{
name = bfd_elf_string_from_elf_section (input_bfd,
@@ -1452,6 +1452,7 @@ i370_elf_relocate_section (output_bfd, info, input_bfd, input_section,
}
(*info->callbacks->reloc_overflow) (info,
+ (h ? &h->root : NULL),
name,
howto->name,
(bfd_vma) 0,
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 5763acc..bca9f5f 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -2941,8 +2941,9 @@ elf_i386_relocate_section (bfd *output_bfd,
if (r == bfd_reloc_overflow)
{
if (! ((*info->callbacks->reloc_overflow)
- (info, name, howto->name, 0,
- input_bfd, input_section, rel->r_offset)))
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_offset)))
return FALSE;
}
else
diff --git a/bfd/elf32-i860.c b/bfd/elf32-i860.c
index 010ac2e..a5499a2 100644
--- a/bfd/elf32-i860.c
+++ b/bfd/elf32-i860.c
@@ -1183,8 +1183,8 @@ elf32_i860_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
{
case bfd_reloc_overflow:
r = info->callbacks->reloc_overflow
- (info, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset);
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
break;
case bfd_reloc_undefined:
diff --git a/bfd/elf32-ip2k.c b/bfd/elf32-ip2k.c
index 758842b..70c05ab 100644
--- a/bfd/elf32-ip2k.c
+++ b/bfd/elf32-ip2k.c
@@ -1545,8 +1545,8 @@ ip2k_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
case bfd_reloc_overflow:
r = info->callbacks->reloc_overflow
- (info, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset);
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
break;
case bfd_reloc_undefined:
diff --git a/bfd/elf32-iq2000.c b/bfd/elf32-iq2000.c
index 60dab34..bb2df9f 100644
--- a/bfd/elf32-iq2000.c
+++ b/bfd/elf32-iq2000.c
@@ -653,8 +653,8 @@ iq2000_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
case bfd_reloc_overflow:
r = info->callbacks->reloc_overflow
- (info, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset);
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
break;
case bfd_reloc_undefined:
diff --git a/bfd/elf32-m32r.c b/bfd/elf32-m32r.c
index fd259cd..3b1cf26 100644
--- a/bfd/elf32-m32r.c
+++ b/bfd/elf32-m32r.c
@@ -3236,8 +3236,8 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
case bfd_reloc_overflow:
if (! ((*info->callbacks->reloc_overflow)
- (info, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, offset)))
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section, offset)))
return FALSE;
break;
diff --git a/bfd/elf32-m68hc1x.c b/bfd/elf32-m68hc1x.c
index 0152943..eeab9d5 100644
--- a/bfd/elf32-m68hc1x.c
+++ b/bfd/elf32-m68hc1x.c
@@ -1173,7 +1173,7 @@ elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
{
case bfd_reloc_overflow:
if (!((*info->callbacks->reloc_overflow)
- (info, name, howto->name, (bfd_vma) 0,
+ (info, NULL, name, howto->name, (bfd_vma) 0,
input_bfd, input_section, rel->r_offset)))
return FALSE;
break;
diff --git a/bfd/elf32-m68k.c b/bfd/elf32-m68k.c
index f1c6ea7..42a3764 100644
--- a/bfd/elf32-m68k.c
+++ b/bfd/elf32-m68k.c
@@ -1731,8 +1731,9 @@ elf_m68k_relocate_section (output_bfd, info, input_bfd, input_section,
if (r == bfd_reloc_overflow)
{
if (!(info->callbacks->reloc_overflow
- (info, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset)))
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_offset)))
return FALSE;
}
else
diff --git a/bfd/elf32-mcore.c b/bfd/elf32-mcore.c
index b51649c..4d11bb0 100644
--- a/bfd/elf32-mcore.c
+++ b/bfd/elf32-mcore.c
@@ -520,7 +520,7 @@ mcore_elf_relocate_section (output_bfd, info, input_bfd, input_section,
const char * name;
if (h != NULL)
- name = h->root.root.string;
+ name = NULL;
else
{
name = bfd_elf_string_from_elf_section
@@ -534,8 +534,8 @@ mcore_elf_relocate_section (output_bfd, info, input_bfd, input_section,
}
(*info->callbacks->reloc_overflow)
- (info, name, howto->name, (bfd_vma) 0, input_bfd, input_section,
- offset);
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section, offset);
}
break;
}
diff --git a/bfd/elf32-msp430.c b/bfd/elf32-msp430.c
index ba59cf7..ac38fec 100644
--- a/bfd/elf32-msp430.c
+++ b/bfd/elf32-msp430.c
@@ -489,8 +489,9 @@ elf32_msp430_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED,
{
case bfd_reloc_overflow:
r = info->callbacks->reloc_overflow
- (info, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset);
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_offset);
break;
case bfd_reloc_undefined:
diff --git a/bfd/elf32-openrisc.c b/bfd/elf32-openrisc.c
index af1c222..af20dcf 100644
--- a/bfd/elf32-openrisc.c
+++ b/bfd/elf32-openrisc.c
@@ -402,8 +402,8 @@ openrisc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
case bfd_reloc_overflow:
r = info->callbacks->reloc_overflow
- (info, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset);
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
break;
case bfd_reloc_undefined:
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index edc4efc..0605da6 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -5746,6 +5746,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
}
if (! (*info->callbacks->reloc_overflow) (info,
+ (h ? &h->root : NULL),
sym_name,
howto->name,
rel->r_addend,
diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c
index 65c27e0..4bf34fa 100644
--- a/bfd/elf32-s390.c
+++ b/bfd/elf32-s390.c
@@ -3029,8 +3029,9 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
{
if (! ((*info->callbacks->reloc_overflow)
- (info, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset)))
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_offset)))
return FALSE;
}
else
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index 4304a4e..de827f3 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -5848,7 +5848,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
const char *name;
if (h != NULL)
- name = h->root.root.string;
+ name = NULL;
else
{
name = (bfd_elf_string_from_elf_section
@@ -5859,8 +5859,9 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
name = bfd_section_name (input_bfd, sec);
}
if (! ((*info->callbacks->reloc_overflow)
- (info, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset)))
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_offset)))
return FALSE;
}
break;
diff --git a/bfd/elf32-sparc.c b/bfd/elf32-sparc.c
index c44a50a..378f14d 100644
--- a/bfd/elf32-sparc.c
+++ b/bfd/elf32-sparc.c
@@ -3014,7 +3014,7 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
const char *name;
if (h != NULL)
- name = h->root.root.string;
+ name = NULL;
else
{
name = bfd_elf_string_from_elf_section (input_bfd,
@@ -3026,8 +3026,9 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
name = bfd_section_name (input_bfd, sec);
}
if (! ((*info->callbacks->reloc_overflow)
- (info, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset)))
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_offset)))
return FALSE;
}
break;
diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c
index 763220a..09eb1ab 100644
--- a/bfd/elf32-v850.c
+++ b/bfd/elf32-v850.c
@@ -1729,8 +1729,9 @@ v850_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
case bfd_reloc_overflow:
if (! ((*info->callbacks->reloc_overflow)
- (info, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset)))
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_offset)))
return FALSE;
break;
diff --git a/bfd/elf32-vax.c b/bfd/elf32-vax.c
index 9a8f040..6d5493b 100644
--- a/bfd/elf32-vax.c
+++ b/bfd/elf32-vax.c
@@ -1814,7 +1814,7 @@ elf_vax_relocate_section (output_bfd, info, input_bfd, input_section,
const char *name;
if (h != NULL)
- name = h->root.root.string;
+ name = NULL;
else
{
name = bfd_elf_string_from_elf_section (input_bfd,
@@ -1826,8 +1826,9 @@ elf_vax_relocate_section (output_bfd, info, input_bfd, input_section,
name = bfd_section_name (input_bfd, sec);
}
if (!(info->callbacks->reloc_overflow
- (info, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset)))
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_offset)))
return FALSE;
}
break;
diff --git a/bfd/elf32-xstormy16.c b/bfd/elf32-xstormy16.c
index 8c96348..9d8635a 100644
--- a/bfd/elf32-xstormy16.c
+++ b/bfd/elf32-xstormy16.c
@@ -940,8 +940,8 @@ xstormy16_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
case bfd_reloc_overflow:
r = info->callbacks->reloc_overflow
- (info, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset);
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
break;
case bfd_reloc_undefined:
diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c
index 6480612..a55ebe6 100644
--- a/bfd/elf64-alpha.c
+++ b/bfd/elf64-alpha.c
@@ -4802,7 +4802,7 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
break;
if (h != NULL)
- name = h->root.root.root.string;
+ name = NULL;
else
{
name = (bfd_elf_string_from_elf_section
@@ -4813,8 +4813,9 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
name = bfd_section_name (input_bfd, sec);
}
if (! ((*info->callbacks->reloc_overflow)
- (info, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset)))
+ (info, (h ? &h->root.root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_offset)))
ret_val = FALSE;
}
break;
diff --git a/bfd/elf64-mmix.c b/bfd/elf64-mmix.c
index 777b5fe..8a4bea2 100644
--- a/bfd/elf64-mmix.c
+++ b/bfd/elf64-mmix.c
@@ -1500,8 +1500,8 @@ mmix_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
case bfd_reloc_overflow:
check_ok = info->callbacks->reloc_overflow
- (info, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset);
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section, rel->r_offset);
break;
case bfd_reloc_undefined:
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index db0bc8f..c21d027 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -9963,7 +9963,8 @@ ppc64_elf_relocate_section (bfd *output_bfd,
}
if (!((*info->callbacks->reloc_overflow)
- (info, sym_name, ppc64_elf_howto_table[r_type]->name,
+ (info, (h ? &h->elf.root : NULL), sym_name,
+ ppc64_elf_howto_table[r_type]->name,
rel->r_addend, input_bfd, input_section, rel->r_offset)))
return FALSE;
}
diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c
index 796c4f7..b428233 100644
--- a/bfd/elf64-s390.c
+++ b/bfd/elf64-s390.c
@@ -3026,8 +3026,9 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
{
if (! ((*info->callbacks->reloc_overflow)
- (info, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset)))
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_offset)))
return FALSE;
}
else
diff --git a/bfd/elf64-sh64.c b/bfd/elf64-sh64.c
index c2e1034..15f7a43 100644
--- a/bfd/elf64-sh64.c
+++ b/bfd/elf64-sh64.c
@@ -2130,7 +2130,7 @@ sh_elf64_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
const char *name;
if (h != NULL)
- name = h->root.root.string;
+ name = NULL;
else
{
name = (bfd_elf_string_from_elf_section
@@ -2141,8 +2141,9 @@ sh_elf64_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
name = bfd_section_name (input_bfd, sec);
}
if (! ((*info->callbacks->reloc_overflow)
- (info, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset)))
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_offset)))
return FALSE;
}
break;
diff --git a/bfd/elf64-sparc.c b/bfd/elf64-sparc.c
index 6a8977c..01b80cd 100644
--- a/bfd/elf64-sparc.c
+++ b/bfd/elf64-sparc.c
@@ -2652,7 +2652,7 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
break;
}
- name = h->root.root.string;
+ name = NULL;
}
else
{
@@ -2666,8 +2666,9 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
name = bfd_section_name (input_bfd, sec);
}
if (! ((*info->callbacks->reloc_overflow)
- (info, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset)))
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_offset)))
return FALSE;
}
break;
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index f039fa7..00d6997 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -2436,8 +2436,9 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
continue;
if (! ((*info->callbacks->reloc_overflow)
- (info, name, howto->name, (bfd_vma) 0,
- input_bfd, input_section, rel->r_offset)))
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_offset)))
return FALSE;
}
else
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 6e3f91f..4180042 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -7216,7 +7216,8 @@ elf_reloc_link_order (bfd *output_bfd,
else
sym_name = link_order->u.reloc.p->u.name;
if (! ((*info->callbacks->reloc_overflow)
- (info, sym_name, howto->name, addend, NULL, NULL, 0)))
+ (info, NULL, sym_name, howto->name, addend, NULL,
+ NULL, (bfd_vma) 0)))
{
free (buf);
return FALSE;
diff --git a/bfd/elfxx-ia64.c b/bfd/elfxx-ia64.c
index 093adbc..917e2c3 100644
--- a/bfd/elfxx-ia64.c
+++ b/bfd/elfxx-ia64.c
@@ -4497,7 +4497,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
const char *name;
if (h)
- name = h->root.root.string;
+ name = NULL;
else
{
name = bfd_elf_string_from_elf_section (input_bfd,
@@ -4506,10 +4506,10 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
if (name == NULL)
return FALSE;
if (*name == '\0')
- name = bfd_section_name (input_bfd, input_section);
+ name = bfd_section_name (input_bfd, sym_sec);
}
- if (!(*info->callbacks->reloc_overflow) (info, name,
- howto->name,
+ if (!(*info->callbacks->reloc_overflow) (info, &h->root,
+ name, howto->name,
(bfd_vma) 0,
input_bfd,
input_section,
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 64eff15..2c98354 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -6416,7 +6416,7 @@ _bfd_mips_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
{
BFD_ASSERT (name != NULL);
if (! ((*info->callbacks->reloc_overflow)
- (info, name, howto->name, 0,
+ (info, NULL, name, howto->name, (bfd_vma) 0,
input_bfd, input_section, rel->r_offset)))
return FALSE;
}
@@ -8020,7 +8020,8 @@ _bfd_elf_mips_get_relocated_section_contents
break;
case bfd_reloc_overflow:
if (!((*link_info->callbacks->reloc_overflow)
- (link_info, bfd_asymbol_name (*(*parent)->sym_ptr_ptr),
+ (link_info, NULL,
+ bfd_asymbol_name (*(*parent)->sym_ptr_ptr),
(*parent)->howto->name, (*parent)->addend,
input_bfd, input_section, (*parent)->address)))
goto error_return;
diff --git a/bfd/linker.c b/bfd/linker.c
index 8abf359..5f4e935 100644
--- a/bfd/linker.c
+++ b/bfd/linker.c
@@ -2529,7 +2529,7 @@ _bfd_generic_reloc_link_order (bfd *abfd,
abort ();
case bfd_reloc_overflow:
if (! ((*info->callbacks->reloc_overflow)
- (info,
+ (info, NULL,
(link_order->type == bfd_section_reloc_link_order
? bfd_section_name (abfd, link_order->u.reloc.p->u.section)
: link_order->u.reloc.p->u.name),
diff --git a/bfd/pdp11.c b/bfd/pdp11.c
index 1188a92..f1aa421 100644
--- a/bfd/pdp11.c
+++ b/bfd/pdp11.c
@@ -4775,7 +4775,7 @@ fprintf (stderr, "TODO: change the address of the relocation\n");
const char *name;
if (h != NULL)
- name = h->root.root.string;
+ name = NULL;
else if (r_extern)
name = strings + GET_WORD (input_bfd,
syms[r_index].e_strx);
@@ -4787,8 +4787,9 @@ fprintf (stderr, "TODO: change the address of the relocation\n");
name = bfd_section_name (input_bfd, s);
}
if (! ((*finfo->info->callbacks->reloc_overflow)
- (finfo->info, name, howto->name,
- (bfd_vma) 0, input_bfd, input_section, r_addr)))
+ (finfo->info, (h ? &h->root : NULL), name,
+ howto->name, (bfd_vma) 0, input_bfd,
+ input_section, r_addr)))
return FALSE;
}
break;
@@ -4954,7 +4955,7 @@ aout_link_reloc_link_order (finfo, o, p)
abort ();
case bfd_reloc_overflow:
if (! ((*finfo->info->callbacks->reloc_overflow)
- (finfo->info,
+ (finfo->info, NULL,
(p->type == bfd_section_reloc_link_order
? bfd_section_name (finfo->output_bfd,
pr->u.section)
diff --git a/bfd/reloc.c b/bfd/reloc.c
index 1df1840..78d19d2 100644
--- a/bfd/reloc.c
+++ b/bfd/reloc.c
@@ -4499,7 +4499,8 @@ bfd_generic_get_relocated_section_contents (bfd *abfd,
break;
case bfd_reloc_overflow:
if (!((*link_info->callbacks->reloc_overflow)
- (link_info, bfd_asymbol_name (*(*parent)->sym_ptr_ptr),
+ (link_info, NULL,
+ bfd_asymbol_name (*(*parent)->sym_ptr_ptr),
(*parent)->howto->name, (*parent)->addend,
input_bfd, input_section, (*parent)->address)))
goto error_return;
diff --git a/bfd/simple.c b/bfd/simple.c
index 41aa950..5d98452 100644
--- a/bfd/simple.c
+++ b/bfd/simple.c
@@ -48,6 +48,7 @@ simple_dummy_undefined_symbol (struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
static bfd_boolean
simple_dummy_reloc_overflow (struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
+ struct bfd_link_hash_entry *entry ATTRIBUTE_UNUSED,
const char *name ATTRIBUTE_UNUSED,
const char *reloc_name ATTRIBUTE_UNUSED,
bfd_vma addend ATTRIBUTE_UNUSED,
diff --git a/bfd/xcofflink.c b/bfd/xcofflink.c
index ccb9c90..8142e16 100644
--- a/bfd/xcofflink.c
+++ b/bfd/xcofflink.c
@@ -6043,7 +6043,7 @@ xcoff_reloc_link_order (output_bfd, finfo, output_section, link_order)
abort ();
case bfd_reloc_overflow:
if (! ((*finfo->info->callbacks->reloc_overflow)
- (finfo->info, link_order->u.reloc.p->u.name,
+ (finfo->info, NULL, link_order->u.reloc.p->u.name,
howto->name, addend, (bfd *) NULL, (asection *) NULL,
(bfd_vma) 0)))
{
diff --git a/include/ChangeLog b/include/ChangeLog
index 5f7d368..53935ec 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,9 @@
+2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR 463
+ * bfdlink.h (bfd_link_callbacks): Add a pointer to struct
+ bfd_link_hash_entry to reloc_overflow.
+
2004-10-12 Paul Brook <paul@codesourcery.com>
* elf/arm.h (EF_ARM_EABI_VER4): Define.
diff --git a/include/bfdlink.h b/include/bfdlink.h
index db276b0..b567342 100644
--- a/include/bfdlink.h
+++ b/include/bfdlink.h
@@ -481,16 +481,18 @@ struct bfd_link_callbacks
bfd_boolean (*undefined_symbol)
(struct bfd_link_info *, const char *name, bfd *abfd,
asection *section, bfd_vma address, bfd_boolean fatal);
- /* A function which is called when a reloc overflow occurs. NAME is
- the name of the symbol or section the reloc is against,
- RELOC_NAME is the name of the relocation, and ADDEND is any
- addend that is used. ABFD, SECTION and ADDRESS identify the
+ /* A function which is called when a reloc overflow occurs. ENTRY is
+ the link hash table entry for the symbol the reloc is against.
+ NAME is the name of the local symbol or section the reloc is
+ against, RELOC_NAME is the name of the relocation, and ADDEND is
+ any addend that is used. ABFD, SECTION and ADDRESS identify the
location at which the overflow occurs; if this is the result of a
bfd_section_reloc_link_order or bfd_symbol_reloc_link_order, then
ABFD will be NULL. */
bfd_boolean (*reloc_overflow)
- (struct bfd_link_info *, const char *name, const char *reloc_name,
- bfd_vma addend, bfd *abfd, asection *section, bfd_vma address);
+ (struct bfd_link_info *, struct bfd_link_hash_entry *entry,
+ const char *name, const char *reloc_name, bfd_vma addend,
+ bfd *abfd, asection *section, bfd_vma address);
/* A function which is called when a dangerous reloc is performed.
The canonical example is an a29k IHCONST reloc which does not
follow an IHIHALF reloc. MESSAGE is an appropriate message.
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 8909eaa..1536e73 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,5 +1,12 @@
2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
+ PR 463
+ * ldmain.c (reloc_overflow): Accept a pointer to struct
+ bfd_link_hash_entry. Report symbol location for relocation
+ overflow.
+
+2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
+
* genscripts.sh (libpath.exp): Really generate for first
emulation only.
diff --git a/ld/ldmain.c b/ld/ldmain.c
index dc2efa2..7344da2 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -137,8 +137,8 @@ static bfd_boolean undefined_symbol
(struct bfd_link_info *, const char *, bfd *, asection *, bfd_vma,
bfd_boolean);
static bfd_boolean reloc_overflow
- (struct bfd_link_info *, const char *, const char *, bfd_vma,
- bfd *, asection *, bfd_vma);
+ (struct bfd_link_info *, struct bfd_link_hash_entry *, const char *,
+ const char *, bfd_vma, bfd *, asection *, bfd_vma);
static bfd_boolean reloc_dangerous
(struct bfd_link_info *, const char *, bfd *, asection *, bfd_vma);
static bfd_boolean unattached_reloc
@@ -1386,6 +1386,7 @@ int overflow_cutoff_limit = 10;
static bfd_boolean
reloc_overflow (struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ struct bfd_link_hash_entry *entry,
const char *name,
const char *reloc_name,
bfd_vma addend,
@@ -1408,7 +1409,32 @@ reloc_overflow (struct bfd_link_info *info ATTRIBUTE_UNUSED,
return TRUE;
}
- einfo (_(" relocation truncated to fit: %s %T"), reloc_name, name);
+ if (entry)
+ {
+ while (entry->type == bfd_link_hash_indirect
+ || entry->type == bfd_link_hash_warning)
+ entry = entry->u.i.link;
+ switch (entry->type)
+ {
+ case bfd_link_hash_undefined:
+ case bfd_link_hash_undefweak:
+ einfo (_(" relocation truncated to fit: %s against undefined symbol `%T'"),
+ reloc_name, entry->root.string);
+ break;
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ einfo (_(" relocation truncated to fit: %s against symbol `%T' defined in %A section in %B"),
+ reloc_name, entry->root.string,
+ entry->u.def.section, entry->u.def.section->owner);
+ break;
+ default:
+ abort ();
+ break;
+ }
+ }
+ else
+ einfo (_(" relocation truncated to fit: %s against `%T'"),
+ reloc_name, name);
if (addend != 0)
einfo ("+%v", addend);
einfo ("\n");