diff options
author | Alan Modra <amodra@gmail.com> | 2011-10-19 07:17:21 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2011-10-19 07:17:21 +0000 |
commit | 1d5316ab67e12d6fb58c29728eb72fa937521e94 (patch) | |
tree | 7e30b8545d04c2270a9f16a224d93498c3896c32 /bfd | |
parent | 371a586695a0e5d47ecfc014ecef4c657c046fca (diff) | |
download | gdb-1d5316ab67e12d6fb58c29728eb72fa937521e94.zip gdb-1d5316ab67e12d6fb58c29728eb72fa937521e94.tar.gz gdb-1d5316ab67e12d6fb58c29728eb72fa937521e94.tar.bz2 |
PR ld/13177
bfd/
* elflink.c (_bfd_elf_gc_mark_rsec): Set symbol "mark".
(elf_gc_sweep_symbol): Don't test plt/got refcounts, instead test
"mark". Hide undefweak too. Clear def_regular and ref_regular.
* elf-m10300.c (mn10300_elf_relocate_section): Ignore unresolved
reloc errors from garbage-collected code.
* elf32-arm.c (elf32_arm_relocate_section): Likewise.
* elf32-bfin.c (bfin_relocate_section): Likewise.
(bfinfdpic_relocate_section): Likewise.
* elf32-cris.c (cris_elf_relocate_section): Likewise.
* elf32-frv.c (elf32_frv_relocate_section): Likewise.
* elf32-i386.c (elf_i386_relocate_section): Likewise.
* elf32-m32r.c (m32r_elf_relocate_section): Likewise.
* elf32-m68k.c (elf_m68k_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-spu.c (spu_elf_relocate_section): Likewise.
* elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
* elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
* elf64-alpha.c (elf64_alpha_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-x86-64.c (elf_x86_64_relocate_section): Likewise.
* elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
* elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
ld/testsuite/
* ld-elf/elf.exp: Move test for shared lib support..
* lib/ld-lib.exp (check_shared_lib_support): ..to here. Add m68hc1*,
and s/ms1/mt/.
(check_gc_sections_available): Match hppa*64 not hppa64. Comment.
* ld-gc/libpersonality.s: New.
* ld-gc/personality.s, * ld-gc/personality.d: New.
* ld-gc/gc.exp: Run personality test.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 30 | ||||
-rw-r--r-- | bfd/elf-m10300.c | 5 | ||||
-rw-r--r-- | bfd/elf32-arm.c | 4 | ||||
-rw-r--r-- | bfd/elf32-bfin.c | 8 | ||||
-rw-r--r-- | bfd/elf32-cris.c | 6 | ||||
-rw-r--r-- | bfd/elf32-frv.c | 5 | ||||
-rw-r--r-- | bfd/elf32-i386.c | 4 | ||||
-rw-r--r-- | bfd/elf32-m32r.c | 6 | ||||
-rw-r--r-- | bfd/elf32-m68k.c | 4 | ||||
-rw-r--r-- | bfd/elf32-ppc.c | 4 | ||||
-rw-r--r-- | bfd/elf32-s390.c | 4 | ||||
-rw-r--r-- | bfd/elf32-sh.c | 6 | ||||
-rw-r--r-- | bfd/elf32-spu.c | 4 | ||||
-rw-r--r-- | bfd/elf32-tilepro.c | 4 | ||||
-rw-r--r-- | bfd/elf32-xtensa.c | 4 | ||||
-rw-r--r-- | bfd/elf64-alpha.c | 15 | ||||
-rw-r--r-- | bfd/elf64-ppc.c | 4 | ||||
-rw-r--r-- | bfd/elf64-s390.c | 4 | ||||
-rw-r--r-- | bfd/elf64-sh64.c | 6 | ||||
-rw-r--r-- | bfd/elf64-x86-64.c | 4 | ||||
-rw-r--r-- | bfd/elflink.c | 26 | ||||
-rw-r--r-- | bfd/elfxx-sparc.c | 4 | ||||
-rw-r--r-- | bfd/elfxx-tilegx.c | 4 |
23 files changed, 129 insertions, 36 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index ec54e21..38ddcab 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,35 @@ 2011-10-19 Alan Modra <amodra@gmail.com> + PR ld/13177 + * elflink.c (_bfd_elf_gc_mark_rsec): Set symbol "mark". + (elf_gc_sweep_symbol): Don't test plt/got refcounts, instead test + "mark". Hide undefweak too. Clear def_regular and ref_regular. + * elf-m10300.c (mn10300_elf_relocate_section): Ignore unresolved + reloc errors from garbage-collected code. + * elf32-arm.c (elf32_arm_relocate_section): Likewise. + * elf32-bfin.c (bfin_relocate_section): Likewise. + (bfinfdpic_relocate_section): Likewise. + * elf32-cris.c (cris_elf_relocate_section): Likewise. + * elf32-frv.c (elf32_frv_relocate_section): Likewise. + * elf32-i386.c (elf_i386_relocate_section): Likewise. + * elf32-m32r.c (m32r_elf_relocate_section): Likewise. + * elf32-m68k.c (elf_m68k_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-spu.c (spu_elf_relocate_section): Likewise. + * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise. + * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise. + * elf64-alpha.c (elf64_alpha_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-x86-64.c (elf_x86_64_relocate_section): Likewise. + * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise. + * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise. + +2011-10-19 Alan Modra <amodra@gmail.com> + PR ld/13311 * elflink.c (elf_link_output_extsym): Correct test for warning when forced local executable syms are referenced from shared libraries. diff --git a/bfd/elf-m10300.c b/bfd/elf-m10300.c index 8276a2f..c2dc583 100644 --- a/bfd/elf-m10300.c +++ b/bfd/elf-m10300.c @@ -1499,7 +1499,10 @@ mn10300_elf_relocate_section (bfd *output_bfd, obscure cases sec->output_section will be NULL. */ relocation = 0; - else if (!info->relocatable && unresolved_reloc) + else if (!info->relocatable && unresolved_reloc + && _bfd_elf_section_offset (output_bfd, info, input_section, + rel->r_offset) != (bfd_vma) -1) + (*_bfd_error_handler) (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"), input_bfd, diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index bcf0aac3..b32163e 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -10386,7 +10386,9 @@ elf32_arm_relocate_section (bfd * output_bfd, not process them. */ if (unresolved_reloc && !((input_section->flags & SEC_DEBUGGING) != 0 - && h->def_dynamic)) + && h->def_dynamic) + && _bfd_elf_section_offset (output_bfd, info, input_section, + rel->r_offset) != (bfd_vma) -1) { (*_bfd_error_handler) (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"), diff --git a/bfd/elf32-bfin.c b/bfd/elf32-bfin.c index b112dfc..f88e5d4 100644 --- a/bfd/elf32-bfin.c +++ b/bfd/elf32-bfin.c @@ -1585,7 +1585,9 @@ bfin_relocate_section (bfd * output_bfd, because such sections are not SEC_ALLOC and thus ld.so will not process them. */ if (unresolved_reloc - && !((input_section->flags & SEC_DEBUGGING) != 0 && h->def_dynamic)) + && !((input_section->flags & SEC_DEBUGGING) != 0 && h->def_dynamic) + && _bfd_elf_section_offset (output_bfd, info, input_section, + rel->r_offset) != (bfd_vma) -1) { (*_bfd_error_handler) (_("%B(%A+0x%lx): unresolvable relocation against symbol `%s'"), @@ -2731,7 +2733,9 @@ bfinfdpic_relocate_section (bfd * output_bfd, default: non_fdpic: picrel = NULL; - if (h && ! BFINFDPIC_SYM_LOCAL (info, h)) + if (h && ! BFINFDPIC_SYM_LOCAL (info, h) + && _bfd_elf_section_offset (output_bfd, info, input_section, + rel->r_offset) != (bfd_vma) -1) { info->callbacks->warning (info, _("relocation references symbol not defined in the module"), diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c index 243a8ec..033d1c8 100644 --- a/bfd/elf32-cris.c +++ b/bfd/elf32-cris.c @@ -1166,7 +1166,11 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, || r_type == R_CRIS_16_PCREL || r_type == R_CRIS_32_PCREL)) relocation = 0; - else if (!info->relocatable && unresolved_reloc) + else if (!info->relocatable && unresolved_reloc + && (_bfd_elf_section_offset (output_bfd, info, + input_section, + rel->r_offset) + != (bfd_vma) -1)) { _bfd_error_handler (_("%B, section %A: unresolvable relocation %s against symbol `%s'"), diff --git a/bfd/elf32-frv.c b/bfd/elf32-frv.c index 7f3c4dd..e4e7f24 100644 --- a/bfd/elf32-frv.c +++ b/bfd/elf32-frv.c @@ -2896,7 +2896,10 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section, default: non_fdpic: picrel = NULL; - if (h && ! FRVFDPIC_SYM_LOCAL (info, h)) + if (h + && ! FRVFDPIC_SYM_LOCAL (info, h) + && _bfd_elf_section_offset (output_bfd, info, input_section, + rel->r_offset) != (bfd_vma) -1) { info->callbacks->einfo (_("%H: relocation references symbol" diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index 38c7c5a..7434356 100644 --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c @@ -4244,7 +4244,9 @@ elf_i386_relocate_section (bfd *output_bfd, not process them. */ if (unresolved_reloc && !((input_section->flags & SEC_DEBUGGING) != 0 - && h->def_dynamic)) + && h->def_dynamic) + && _bfd_elf_section_offset (output_bfd, info, input_section, + rel->r_offset) != (bfd_vma) -1) { (*_bfd_error_handler) (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"), diff --git a/bfd/elf32-m32r.c b/bfd/elf32-m32r.c index 51ef61e..37d995d 100644 --- a/bfd/elf32-m32r.c +++ b/bfd/elf32-m32r.c @@ -2589,7 +2589,11 @@ m32r_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, relocation = (h->root.u.def.value + sec->output_section->vma + sec->output_offset); - else if (!info->relocatable) + else if (!info->relocatable + && (_bfd_elf_section_offset (output_bfd, info, + input_section, + rel->r_offset) + != (bfd_vma) -1)) { (*_bfd_error_handler) (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"), diff --git a/bfd/elf32-m68k.c b/bfd/elf32-m68k.c index 612525c..8c93548 100644 --- a/bfd/elf32-m68k.c +++ b/bfd/elf32-m68k.c @@ -4148,7 +4148,9 @@ elf_m68k_relocate_section (output_bfd, info, input_bfd, input_section, not process them. */ if (unresolved_reloc && !((input_section->flags & SEC_DEBUGGING) != 0 - && h->def_dynamic)) + && h->def_dynamic) + && _bfd_elf_section_offset (output_bfd, info, input_section, + rel->r_offset) != (bfd_vma) -1) { (*_bfd_error_handler) (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"), diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index cfb4734..ab50f1a 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c @@ -8150,7 +8150,9 @@ ppc_elf_relocate_section (bfd *output_bfd, if (unresolved_reloc && !((input_section->flags & SEC_DEBUGGING) != 0 - && h->def_dynamic)) + && h->def_dynamic) + && _bfd_elf_section_offset (output_bfd, info, input_section, + rel->r_offset) != (bfd_vma) -1) { info->callbacks->einfo (_("%P: %H: unresolvable %s relocation against symbol `%s'\n"), diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c index 98437d0..2cfd53e 100644 --- a/bfd/elf32-s390.c +++ b/bfd/elf32-s390.c @@ -2996,7 +2996,9 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section, not process them. */ if (unresolved_reloc && !((input_section->flags & SEC_DEBUGGING) != 0 - && h->def_dynamic)) + && h->def_dynamic) + && _bfd_elf_section_offset (output_bfd, info, input_section, + rel->r_offset) != (bfd_vma) -1) (*_bfd_error_handler) (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"), input_bfd, diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c index ca2c4af..780a3bf 100644 --- a/bfd/elf32-sh.c +++ b/bfd/elf32-sh.c @@ -4208,7 +4208,11 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, STT_DATALABEL on the way to it. */ | ((h->other & STO_SH5_ISA32) != 0 && ! seen_stt_datalabel)); - else if (!info->relocatable) + else if (!info->relocatable + && (_bfd_elf_section_offset (output_bfd, info, + input_section, + rel->r_offset) + != (bfd_vma) -1)) { (*_bfd_error_handler) (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"), diff --git a/bfd/elf32-spu.c b/bfd/elf32-spu.c index ae3ed10..cff9185 100644 --- a/bfd/elf32-spu.c +++ b/bfd/elf32-spu.c @@ -5000,7 +5000,9 @@ spu_elf_relocate_section (bfd *output_bfd, else if (is_ea_sym) unresolved_reloc = TRUE; - if (unresolved_reloc) + if (unresolved_reloc + && _bfd_elf_section_offset (output_bfd, info, input_section, + rel->r_offset) != (bfd_vma) -1) { (*_bfd_error_handler) (_("%B(%s+0x%lx): unresolvable %s relocation against symbol `%s'"), diff --git a/bfd/elf32-tilepro.c b/bfd/elf32-tilepro.c index f2aed9c..7b08aff 100644 --- a/bfd/elf32-tilepro.c +++ b/bfd/elf32-tilepro.c @@ -3110,7 +3110,9 @@ tilepro_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, not process them. */ if (unresolved_reloc && !((input_section->flags & SEC_DEBUGGING) != 0 - && h->def_dynamic)) + && h->def_dynamic) + && _bfd_elf_section_offset (output_bfd, info, input_section, + rel->r_offset) != (bfd_vma) -1) (*_bfd_error_handler) (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"), input_bfd, diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c index c6e4fb4..877ab6f 100644 --- a/bfd/elf32-xtensa.c +++ b/bfd/elf32-xtensa.c @@ -3058,7 +3058,9 @@ elf_xtensa_relocate_section (bfd *output_bfd, not process them. */ if (unresolved_reloc && !((input_section->flags & SEC_DEBUGGING) != 0 - && h->def_dynamic)) + && h->def_dynamic) + && _bfd_elf_section_offset (output_bfd, info, input_section, + rel->r_offset) != (bfd_vma) -1) { (*_bfd_error_handler) (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"), diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c index 528476b..94ea685 100644 --- a/bfd/elf64-alpha.c +++ b/bfd/elf64-alpha.c @@ -4213,6 +4213,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info, bfd_vma value; bfd_vma addend; bfd_boolean dynamic_symbol_p; + bfd_boolean unresolved_reloc = FALSE; bfd_boolean undef_weak_ref = FALSE; unsigned long r_type; @@ -4294,7 +4295,6 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info, else { bfd_boolean warned; - bfd_boolean unresolved_reloc; struct elf_link_hash_entry *hh; struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (input_bfd); @@ -4527,7 +4527,12 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info, else if (info->shared && r_symndx != STN_UNDEF && (input_section->flags & SEC_ALLOC) - && !undef_weak_ref) + && !undef_weak_ref + && !(unresolved_reloc + && (_bfd_elf_section_offset (output_bfd, info, + input_section, + rel->r_offset) + == (bfd_vma) -1))) { if (r_type == R_ALPHA_REFLONG) { @@ -4573,7 +4578,11 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info, /* ??? .eh_frame references to discarded sections will be smashed to relocations against SHN_UNDEF. The .eh_frame format allows NULL to be encoded as 0 in any format, so this works here. */ - if (r_symndx == STN_UNDEF) + if (r_symndx == STN_UNDEF + || (unresolved_reloc + && _bfd_elf_section_offset (output_bfd, info, + input_section, + rel->r_offset) == (bfd_vma) -1)) howto = (elf64_alpha_howto_table + (r_type - R_ALPHA_SREL32 + R_ALPHA_REFLONG)); goto default_reloc; diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 837568c..dfe10fa 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -13459,7 +13459,9 @@ ppc64_elf_relocate_section (bfd *output_bfd, not process them. */ if (unresolved_reloc && !((input_section->flags & SEC_DEBUGGING) != 0 - && h->elf.def_dynamic)) + && h->elf.def_dynamic) + && _bfd_elf_section_offset (output_bfd, info, input_section, + rel->r_offset) != (bfd_vma) -1) { info->callbacks->einfo (_("%P: %H: unresolvable %s relocation against symbol `%s'\n"), diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c index 9884da0..7d3e882 100644 --- a/bfd/elf64-s390.c +++ b/bfd/elf64-s390.c @@ -2971,7 +2971,9 @@ elf_s390_relocate_section (bfd *output_bfd, not process them. */ if (unresolved_reloc && !((input_section->flags & SEC_DEBUGGING) != 0 - && h->def_dynamic)) + && h->def_dynamic) + && _bfd_elf_section_offset (output_bfd, info, input_section, + rel->r_offset) != (bfd_vma) -1) (*_bfd_error_handler) (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"), input_bfd, diff --git a/bfd/elf64-sh64.c b/bfd/elf64-sh64.c index bbef2a2..9202477 100644 --- a/bfd/elf64-sh64.c +++ b/bfd/elf64-sh64.c @@ -1630,7 +1630,11 @@ sh_elf64_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, STT_DATALABEL on the way to it. */ | ((h->other & STO_SH5_ISA32) != 0 && ! seen_stt_datalabel)); - else if (!info->relocatable) + else if (!info->relocatable + && (_bfd_elf_section_offset (output_bfd, info, + input_section, + rel->r_offset) + != (bfd_vma) -1)) { (*_bfd_error_handler) (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"), diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index 238c7bd..092f447 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c @@ -4103,7 +4103,9 @@ elf_x86_64_relocate_section (bfd *output_bfd, not process them. */ if (unresolved_reloc && !((input_section->flags & SEC_DEBUGGING) != 0 - && h->def_dynamic)) + && h->def_dynamic) + && _bfd_elf_section_offset (output_bfd, info, input_section, + rel->r_offset) != (bfd_vma) -1) (*_bfd_error_handler) (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"), input_bfd, diff --git a/bfd/elflink.c b/bfd/elflink.c index 9956e81..4f55d9a 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -11577,6 +11577,7 @@ _bfd_elf_gc_mark_rsec (struct bfd_link_info *info, asection *sec, 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; + h->mark = 1; return (*gc_mark_hook) (sec, info, cookie->rel, h, NULL); } @@ -11724,19 +11725,20 @@ struct elf_gc_sweep_symbol_info static bfd_boolean elf_gc_sweep_symbol (struct elf_link_hash_entry *h, void *data) { - if (((h->root.type == bfd_link_hash_defined - || h->root.type == bfd_link_hash_defweak) - && !h->root.u.def.section->gc_mark - && (!(h->root.u.def.section->owner->flags & DYNAMIC) - || (h->plt.refcount <= 0 - && h->got.refcount <= 0))) - || (h->root.type == bfd_link_hash_undefined - && h->plt.refcount <= 0 - && h->got.refcount <= 0)) - { - struct elf_gc_sweep_symbol_info *inf = - (struct elf_gc_sweep_symbol_info *) data; + if (!h->mark + && (((h->root.type == bfd_link_hash_defined + || h->root.type == bfd_link_hash_defweak) + && !h->root.u.def.section->gc_mark) + || h->root.type == bfd_link_hash_undefined + || h->root.type == bfd_link_hash_undefweak)) + { + struct elf_gc_sweep_symbol_info *inf; + + inf = (struct elf_gc_sweep_symbol_info *) data; (*inf->hide_symbol) (inf->info, h, TRUE); + h->def_regular = 0; + h->ref_regular = 0; + h->ref_regular_nonweak = 0; } return TRUE; diff --git a/bfd/elfxx-sparc.c b/bfd/elfxx-sparc.c index 9a15124..fe18a62 100644 --- a/bfd/elfxx-sparc.c +++ b/bfd/elfxx-sparc.c @@ -3828,7 +3828,9 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, not process them. */ if (unresolved_reloc && !((input_section->flags & SEC_DEBUGGING) != 0 - && h->def_dynamic)) + && h->def_dynamic) + && _bfd_elf_section_offset (output_bfd, info, input_section, + rel->r_offset) != (bfd_vma) -1) (*_bfd_error_handler) (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"), input_bfd, diff --git a/bfd/elfxx-tilegx.c b/bfd/elfxx-tilegx.c index c484562..2aaa3d3 100644 --- a/bfd/elfxx-tilegx.c +++ b/bfd/elfxx-tilegx.c @@ -3493,7 +3493,9 @@ tilegx_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, not process them. */ if (unresolved_reloc && !((input_section->flags & SEC_DEBUGGING) != 0 - && h->def_dynamic)) + && h->def_dynamic) + && _bfd_elf_section_offset (output_bfd, info, input_section, + rel->r_offset) != (bfd_vma) -1) (*_bfd_error_handler) (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"), input_bfd, |