From 6c6bc899302deb7c9b14f71da79c0fffc992204e Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 28 Nov 2017 04:54:35 -0800 Subject: [PATCH] ELF: Don't set non_ir_ref_regular in check_relocs Since elf_link_add_object_symbols sets non_ir_ref_regular now, there is no need to set non_ir_ref_regular in check_relocs. Tested on i686 and x86-64. * elf-m10300.c (mn10300_elf_check_relocs): Don't set non_ir_ref_regular. * elf32-arm.c (elf32_arm_check_relocs): Likewise. * elf32-bfin.c (bfin_check_relocs): Likewise. * elf32-cr16.c (cr16_elf_check_relocs): Likewise. * elf32-cris.c (cris_elf_check_relocs): Likewise. * elf32-d10v.c (elf32_d10v_check_relocs): Likewise. * elf32-dlx.c (elf32_dlx_check_relocs): Likewise. * elf32-fr30.c (fr30_elf_check_relocs): Likewise. * elf32-frv.c (elf32_frv_check_relocs): Likewise. * elf32-hppa.c (elf32_hppa_check_relocs): Likewise. * elf32-i370.c (i370_elf_check_relocs): Likewise. * elf32-i386.c (elf_i386_check_relocs): Likewise. * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise. * elf32-lm32.c (lm32_elf_check_relocs): Likewise. * elf32-m32c.c (m32c_elf_check_relocs): Likewise. * elf32-m32r.c (m32r_elf_check_relocs): Likewise. * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise. * elf32-m68k.c (elf_m68k_check_relocs): Likewise. * elf32-mcore.c (mcore_elf_check_relocs): Likewise. * elf32-metag.c (elf_metag_check_relocs): Likewise. * elf32-microblaze.c (microblaze_elf_check_relocs): Likewise. * elf32-moxie.c (moxie_elf_check_relocs): Likewise. * elf32-msp430.c (elf32_msp430_check_relocs): Likewise. * elf32-mt.c (mt_elf_check_relocs): Likewise. * elf32-nios2.c (nios2_elf32_check_relocs): Likewise. * elf32-or1k.c (or1k_elf_check_relocs): Likewise. * elf32-ppc.c (ppc_elf_check_relocs): Likewise. * elf32-rl78.c (rl78_elf_check_relocs): Likewise. * elf32-s390.c (elf_s390_check_relocs): Likewise. * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise. * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise. * elf32-sh.c (sh_elf_check_relocs): Likewise. * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise. * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise. * elf32-v850.c (v850_elf_check_relocs): Likewise. * elf32-vax.c (elf_vax_check_relocs): Likewise. * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise. * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise. * elf64-aarch64.c (elf64_aarch64_check_relocs): Likewise. * elf64-alpha.c (elf64_alpha_check_relocs): Likewise. * elf64-hppa.c (elf64_hppa_check_relocs): Likewise. * elf64-ia64-vms.c (elf64_ia64_check_relocs): Likewise. * elf64-mmix.c (mmix_elf_check_relocs): Likewise. * elf64-ppc.c (ppc64_elf_check_relocs): Likewise. * elf64-s390.c (elf_s390_check_relocs): Likewise. * elf64-sh64.c (sh_elf64_check_relocs): Likewise. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise. * elfnn-ia64.c (elfNN_ia64_check_relocs): Likewise. * elfnn-riscv.c (riscv_elf_check_relocs): Likewise. * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise. * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise. --- bfd/ChangeLog | 57 ++++++++++++++++++++++++++++++++++++++++++ bfd/elf-m10300.c | 4 --- bfd/elf32-arm.c | 4 --- bfd/elf32-bfin.c | 4 --- bfd/elf32-cr16.c | 4 --- bfd/elf32-cris.c | 4 --- bfd/elf32-d10v.c | 4 --- bfd/elf32-dlx.c | 4 --- bfd/elf32-fr30.c | 4 --- bfd/elf32-frv.c | 4 --- bfd/elf32-hppa.c | 4 --- bfd/elf32-i370.c | 4 --- bfd/elf32-i386.c | 1 - bfd/elf32-iq2000.c | 4 --- bfd/elf32-lm32.c | 4 --- bfd/elf32-m32c.c | 4 --- bfd/elf32-m32r.c | 4 --- bfd/elf32-m68hc1x.c | 4 --- bfd/elf32-m68k.c | 4 --- bfd/elf32-mcore.c | 4 --- bfd/elf32-metag.c | 4 --- bfd/elf32-microblaze.c | 4 --- bfd/elf32-moxie.c | 4 --- bfd/elf32-msp430.c | 4 --- bfd/elf32-mt.c | 4 --- bfd/elf32-nios2.c | 4 --- bfd/elf32-or1k.c | 4 --- bfd/elf32-ppc.c | 4 --- bfd/elf32-rl78.c | 4 --- bfd/elf32-s390.c | 4 --- bfd/elf32-score.c | 4 --- bfd/elf32-score7.c | 4 --- bfd/elf32-sh.c | 4 --- bfd/elf32-tic6x.c | 4 --- bfd/elf32-tilepro.c | 4 --- bfd/elf32-v850.c | 4 --- bfd/elf32-vax.c | 4 --- bfd/elf32-xstormy16.c | 4 --- bfd/elf32-xtensa.c | 4 --- bfd/elf64-alpha.c | 1 - bfd/elf64-hppa.c | 1 - bfd/elf64-ia64-vms.c | 1 - bfd/elf64-mmix.c | 4 --- bfd/elf64-ppc.c | 9 ------- bfd/elf64-s390.c | 4 --- bfd/elf64-sh64.c | 4 --- bfd/elf64-x86-64.c | 1 - bfd/elfnn-aarch64.c | 5 ---- bfd/elfnn-ia64.c | 1 - bfd/elfnn-riscv.c | 4 --- bfd/elfxx-mips.c | 4 --- bfd/elfxx-sparc.c | 4 --- bfd/elfxx-tilegx.c | 4 --- 53 files changed, 57 insertions(+), 196 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index c9c24079a45..e2b94abaf0a 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,60 @@ +2017-11-28 H.J. Lu + + * elf-m10300.c (mn10300_elf_check_relocs): Don't set + non_ir_ref_regular. + * elf32-arm.c (elf32_arm_check_relocs): Likewise. + * elf32-bfin.c (bfin_check_relocs): Likewise. + * elf32-cr16.c (cr16_elf_check_relocs): Likewise. + * elf32-cris.c (cris_elf_check_relocs): Likewise. + * elf32-d10v.c (elf32_d10v_check_relocs): Likewise. + * elf32-dlx.c (elf32_dlx_check_relocs): Likewise. + * elf32-fr30.c (fr30_elf_check_relocs): Likewise. + * elf32-frv.c (elf32_frv_check_relocs): Likewise. + * elf32-hppa.c (elf32_hppa_check_relocs): Likewise. + * elf32-i370.c (i370_elf_check_relocs): Likewise. + * elf32-i386.c (elf_i386_check_relocs): Likewise. + * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise. + * elf32-lm32.c (lm32_elf_check_relocs): Likewise. + * elf32-m32c.c (m32c_elf_check_relocs): Likewise. + * elf32-m32r.c (m32r_elf_check_relocs): Likewise. + * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise. + * elf32-m68k.c (elf_m68k_check_relocs): Likewise. + * elf32-mcore.c (mcore_elf_check_relocs): Likewise. + * elf32-metag.c (elf_metag_check_relocs): Likewise. + * elf32-microblaze.c (microblaze_elf_check_relocs): Likewise. + * elf32-moxie.c (moxie_elf_check_relocs): Likewise. + * elf32-msp430.c (elf32_msp430_check_relocs): Likewise. + * elf32-mt.c (mt_elf_check_relocs): Likewise. + * elf32-nios2.c (nios2_elf32_check_relocs): Likewise. + * elf32-or1k.c (or1k_elf_check_relocs): Likewise. + * elf32-ppc.c (ppc_elf_check_relocs): Likewise. + * elf32-rl78.c (rl78_elf_check_relocs): Likewise. + * elf32-s390.c (elf_s390_check_relocs): Likewise. + * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise. + * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise. + * elf32-sh.c (sh_elf_check_relocs): Likewise. + * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise. + * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise. + * elf32-v850.c (v850_elf_check_relocs): Likewise. + * elf32-vax.c (elf_vax_check_relocs): Likewise. + * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise. + * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise. + * elf64-aarch64.c (elf64_aarch64_check_relocs): Likewise. + * elf64-alpha.c (elf64_alpha_check_relocs): Likewise. + * elf64-hppa.c (elf64_hppa_check_relocs): Likewise. + * elf64-ia64-vms.c (elf64_ia64_check_relocs): Likewise. + * elf64-mmix.c (mmix_elf_check_relocs): Likewise. + * elf64-ppc.c (ppc64_elf_check_relocs): Likewise. + * elf64-s390.c (elf_s390_check_relocs): Likewise. + * elf64-sh64.c (sh_elf64_check_relocs): Likewise. + * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. + * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise. + * elfnn-ia64.c (elfNN_ia64_check_relocs): Likewise. + * elfnn-riscv.c (riscv_elf_check_relocs): Likewise. + * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise. + * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise. + * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise. + 2017-11-28 Alan Modra PR 22471 diff --git a/bfd/elf-m10300.c b/bfd/elf-m10300.c index 82d58e716a6..1bbfa2da655 100644 --- a/bfd/elf-m10300.c +++ b/bfd/elf-m10300.c @@ -1091,10 +1091,6 @@ mn10300_elf_check_relocs (bfd *abfd, 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; - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; } r_type = ELF32_R_TYPE (rel->r_info); diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index f358995e272..bd0fee615c0 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -14388,10 +14388,6 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *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; - - /* PR15323, ref flags aren't set for references in the - same object. */ - h->root.non_ir_ref_regular = 1; } } diff --git a/bfd/elf32-bfin.c b/bfd/elf32-bfin.c index df6634aad18..1bbd5a8b28d 100644 --- a/bfd/elf32-bfin.c +++ b/bfd/elf32-bfin.c @@ -1188,10 +1188,6 @@ bfin_check_relocs (bfd * abfd, else { h = sym_hashes[r_symndx - symtab_hdr->sh_info]; - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; } switch (ELF32_R_TYPE (rel->r_info)) diff --git a/bfd/elf32-cr16.c b/bfd/elf32-cr16.c index 6d7962dc968..36f7aec5d69 100644 --- a/bfd/elf32-cr16.c +++ b/bfd/elf32-cr16.c @@ -735,10 +735,6 @@ cr16_elf_check_relocs (bfd *abfd, 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; - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; } /* Some relocs require a global offset table. */ diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c index 9f1d24418ee..6a70fee76c9 100644 --- a/bfd/elf32-cris.c +++ b/bfd/elf32-cris.c @@ -2993,10 +2993,6 @@ cris_elf_check_relocs (bfd *abfd, 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; - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; } r_type = ELF32_R_TYPE (rel->r_info); diff --git a/bfd/elf32-d10v.c b/bfd/elf32-d10v.c index d284d4f5654..3ca42925ff2 100644 --- a/bfd/elf32-d10v.c +++ b/bfd/elf32-d10v.c @@ -291,10 +291,6 @@ elf32_d10v_check_relocs (bfd *abfd, 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; - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; } switch (ELF32_R_TYPE (rel->r_info)) diff --git a/bfd/elf32-dlx.c b/bfd/elf32-dlx.c index b12d24a3e42..802030697e4 100644 --- a/bfd/elf32-dlx.c +++ b/bfd/elf32-dlx.c @@ -451,10 +451,6 @@ elf32_dlx_check_relocs (bfd *abfd, 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; - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; } switch (ELF32_R_TYPE (rel->r_info)) diff --git a/bfd/elf32-fr30.c b/bfd/elf32-fr30.c index 94070d8ef26..b3edcc7b5e2 100644 --- a/bfd/elf32-fr30.c +++ b/bfd/elf32-fr30.c @@ -670,10 +670,6 @@ fr30_elf_check_relocs (bfd *abfd, 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; - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; } switch (ELF32_R_TYPE (rel->r_info)) diff --git a/bfd/elf32-frv.c b/bfd/elf32-frv.c index 935bb10a222..c85468968ad 100644 --- a/bfd/elf32-frv.c +++ b/bfd/elf32-frv.c @@ -6039,10 +6039,6 @@ elf32_frv_check_relocs (bfd *abfd, 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; - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; } switch (ELF32_R_TYPE (rel->r_info)) diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c index a0f7060fe1a..6b2abb26a14 100644 --- a/bfd/elf32-hppa.c +++ b/bfd/elf32-hppa.c @@ -1175,10 +1175,6 @@ elf32_hppa_check_relocs (bfd *abfd, while (hh->eh.root.type == bfd_link_hash_indirect || hh->eh.root.type == bfd_link_hash_warning) hh = hppa_elf_hash_entry (hh->eh.root.u.i.link); - - /* PR15323, ref flags aren't set for references in the same - object. */ - hh->eh.root.non_ir_ref_regular = 1; } r_type = ELF32_R_TYPE (rela->r_info); diff --git a/bfd/elf32-i370.c b/bfd/elf32-i370.c index 46f822f4211..d47abf67d81 100644 --- a/bfd/elf32-i370.c +++ b/bfd/elf32-i370.c @@ -836,10 +836,6 @@ i370_elf_check_relocs (bfd *abfd, 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; - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; } if (bfd_link_pic (info)) diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index c9ff0c4bbfd..8caf823f9f8 100644 --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c @@ -1556,7 +1556,6 @@ elf_i386_check_relocs (bfd *abfd, /* It is referenced by a non-shared object. */ h->ref_regular = 1; - h->root.non_ir_ref_regular = 1; if (h->type == STT_GNU_IFUNC) elf_tdata (info->output_bfd)->has_gnu_symbols diff --git a/bfd/elf32-iq2000.c b/bfd/elf32-iq2000.c index 0260cc3fc5c..b6ca9bd483e 100644 --- a/bfd/elf32-iq2000.c +++ b/bfd/elf32-iq2000.c @@ -483,10 +483,6 @@ iq2000_elf_check_relocs (bfd *abfd, 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; - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; } switch (ELF32_R_TYPE (rel->r_info)) diff --git a/bfd/elf32-lm32.c b/bfd/elf32-lm32.c index ea404a9f912..e0286d6d521 100644 --- a/bfd/elf32-lm32.c +++ b/bfd/elf32-lm32.c @@ -1214,10 +1214,6 @@ lm32_elf_check_relocs (bfd *abfd, 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; - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; } /* Some relocs require a global offset table. */ diff --git a/bfd/elf32-m32c.c b/bfd/elf32-m32c.c index 2cb28b21d78..c6c70852de1 100644 --- a/bfd/elf32-m32c.c +++ b/bfd/elf32-m32c.c @@ -686,10 +686,6 @@ m32c_elf_check_relocs 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; - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; } switch (ELF32_R_TYPE (rel->r_info)) diff --git a/bfd/elf32-m32r.c b/bfd/elf32-m32r.c index 594c9e44bb6..9a7b5c3f9bb 100644 --- a/bfd/elf32-m32r.c +++ b/bfd/elf32-m32r.c @@ -3588,10 +3588,6 @@ m32r_elf_check_relocs (bfd *abfd, 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; - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; } /* Some relocs require a global offset table. */ diff --git a/bfd/elf32-m68hc1x.c b/bfd/elf32-m68hc1x.c index cc6eb2d3f18..97b574485ab 100644 --- a/bfd/elf32-m68hc1x.c +++ b/bfd/elf32-m68hc1x.c @@ -876,10 +876,6 @@ elf32_m68hc11_check_relocs (bfd *abfd, struct bfd_link_info *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; - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; } switch (ELF32_R_TYPE (rel->r_info)) diff --git a/bfd/elf32-m68k.c b/bfd/elf32-m68k.c index b07bbf421f7..e5fd26a0851 100644 --- a/bfd/elf32-m68k.c +++ b/bfd/elf32-m68k.c @@ -2519,10 +2519,6 @@ elf_m68k_check_relocs (bfd *abfd, 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; - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; } switch (ELF32_R_TYPE (rel->r_info)) diff --git a/bfd/elf32-mcore.c b/bfd/elf32-mcore.c index 44cd1eebd38..fee15261d19 100644 --- a/bfd/elf32-mcore.c +++ b/bfd/elf32-mcore.c @@ -615,10 +615,6 @@ mcore_elf_check_relocs (bfd * abfd, 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; - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; } switch (ELF32_R_TYPE (rel->r_info)) diff --git a/bfd/elf32-metag.c b/bfd/elf32-metag.c index a44bddbee3e..3a80cb361a4 100644 --- a/bfd/elf32-metag.c +++ b/bfd/elf32-metag.c @@ -2128,10 +2128,6 @@ elf_metag_check_relocs (bfd *abfd, while (hh->eh.root.type == bfd_link_hash_indirect || hh->eh.root.type == bfd_link_hash_warning) hh = (struct elf_metag_link_hash_entry *) hh->eh.root.u.i.link; - - /* PR15323, ref flags aren't set for references in the same - object. */ - hh->eh.root.non_ir_ref_regular = 1; } /* Some relocs require a global offset table. */ diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c index 9b581688cd0..3307a9125b2 100644 --- a/bfd/elf32-microblaze.c +++ b/bfd/elf32-microblaze.c @@ -2310,10 +2310,6 @@ microblaze_elf_check_relocs (bfd * abfd, 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; - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; } switch (r_type) diff --git a/bfd/elf32-moxie.c b/bfd/elf32-moxie.c index f955096880f..1afb102abfb 100644 --- a/bfd/elf32-moxie.c +++ b/bfd/elf32-moxie.c @@ -356,10 +356,6 @@ moxie_elf_check_relocs (bfd *abfd, 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; - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; } } diff --git a/bfd/elf32-msp430.c b/bfd/elf32-msp430.c index e1e6ed0ee57..774c54adb96 100644 --- a/bfd/elf32-msp430.c +++ b/bfd/elf32-msp430.c @@ -695,10 +695,6 @@ elf32_msp430_check_relocs (bfd * abfd, struct bfd_link_info * 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; - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; } } diff --git a/bfd/elf32-mt.c b/bfd/elf32-mt.c index b4625d46f7a..210aef0949f 100644 --- a/bfd/elf32-mt.c +++ b/bfd/elf32-mt.c @@ -455,10 +455,6 @@ mt_elf_check_relocs 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; - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; } } diff --git a/bfd/elf32-nios2.c b/bfd/elf32-nios2.c index f2d0452ea0e..5da2a64f3d1 100644 --- a/bfd/elf32-nios2.c +++ b/bfd/elf32-nios2.c @@ -4738,10 +4738,6 @@ nios2_elf32_check_relocs (bfd *abfd, struct bfd_link_info *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; - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; } r_type = ELF32_R_TYPE (rel->r_info); diff --git a/bfd/elf32-or1k.c b/bfd/elf32-or1k.c index 8abd978afa9..c12dea4746b 100644 --- a/bfd/elf32-or1k.c +++ b/bfd/elf32-or1k.c @@ -1346,10 +1346,6 @@ or1k_elf_check_relocs (bfd *abfd, 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; - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; } switch (ELF32_R_TYPE (rel->r_info)) diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index 81e53153224..89069715191 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c @@ -3999,10 +3999,6 @@ ppc_elf_check_relocs (bfd *abfd, 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; - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; } /* If a relocation refers to _GLOBAL_OFFSET_TABLE_, create the .got. diff --git a/bfd/elf32-rl78.c b/bfd/elf32-rl78.c index bc1f3c72cc3..553c0c5828a 100644 --- a/bfd/elf32-rl78.c +++ b/bfd/elf32-rl78.c @@ -1325,10 +1325,6 @@ rl78_elf_check_relocs 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; - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; } switch (ELF32_R_TYPE (rel->r_info)) diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c index 1bd6ab10fa6..d073ea29072 100644 --- a/bfd/elf32-s390.c +++ b/bfd/elf32-s390.c @@ -993,10 +993,6 @@ elf_s390_check_relocs (bfd *abfd, 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; - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; } /* Create got section and local_got_refcounts array if they diff --git a/bfd/elf32-score.c b/bfd/elf32-score.c index 455f8cb0b37..061b92a6772 100644 --- a/bfd/elf32-score.c +++ b/bfd/elf32-score.c @@ -2835,10 +2835,6 @@ s3_bfd_score_elf_check_relocs (bfd *abfd, { while (h->root.type == bfd_link_hash_indirect) h = (struct elf_link_hash_entry *)h->root.u.i.link; - - /* PR15323, ref flags aren't set for references in the - same object. */ - h->root.non_ir_ref_regular = 1; } } diff --git a/bfd/elf32-score7.c b/bfd/elf32-score7.c index 29796b95791..52ffb71b0d7 100644 --- a/bfd/elf32-score7.c +++ b/bfd/elf32-score7.c @@ -2640,10 +2640,6 @@ s7_bfd_score_elf_check_relocs (bfd *abfd, { while (h->root.type == bfd_link_hash_indirect) h = (struct elf_link_hash_entry *) h->root.u.i.link; - - /* PR15323, ref flags aren't set for references in the - same object. */ - h->root.non_ir_ref_regular = 1; } } diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c index cd1c6fd68e6..e451bb6ae32 100644 --- a/bfd/elf32-sh.c +++ b/bfd/elf32-sh.c @@ -5832,10 +5832,6 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, #endif h = (struct elf_link_hash_entry *) h->root.u.i.link; } - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; } r_type = sh_elf_optimized_tls_reloc (info, r_type, h == NULL); diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c index 5da819186a3..8575a266564 100644 --- a/bfd/elf32-tic6x.c +++ b/bfd/elf32-tic6x.c @@ -2748,10 +2748,6 @@ elf32_tic6x_check_relocs (bfd *abfd, struct bfd_link_info *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; - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; } switch (r_type) diff --git a/bfd/elf32-tilepro.c b/bfd/elf32-tilepro.c index 86456648ce2..9643e703e06 100644 --- a/bfd/elf32-tilepro.c +++ b/bfd/elf32-tilepro.c @@ -1501,10 +1501,6 @@ tilepro_elf_check_relocs (bfd *abfd, struct bfd_link_info *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; - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; } r_type = tilepro_elf_tls_transition (info, r_type, h == NULL); diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c index f33a5206390..3f9954c5ca5 100644 --- a/bfd/elf32-v850.c +++ b/bfd/elf32-v850.c @@ -83,10 +83,6 @@ v850_elf_check_relocs (bfd *abfd, 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; - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; } r_type = ELF32_R_TYPE (rel->r_info); diff --git a/bfd/elf32-vax.c b/bfd/elf32-vax.c index 8b55a0c34a8..b5c37d7acd1 100644 --- a/bfd/elf32-vax.c +++ b/bfd/elf32-vax.c @@ -588,10 +588,6 @@ elf_vax_check_relocs (bfd *abfd, 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; - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; } switch (ELF32_R_TYPE (rel->r_info)) diff --git a/bfd/elf32-xstormy16.c b/bfd/elf32-xstormy16.c index d6aab8f27c0..859a49b8f19 100644 --- a/bfd/elf32-xstormy16.c +++ b/bfd/elf32-xstormy16.c @@ -435,10 +435,6 @@ xstormy16_elf_check_relocs (bfd *abfd, 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; - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; } switch (ELF32_R_TYPE (rel->r_info)) diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c index 6aba5bc638f..3c7de9b4e4e 100644 --- a/bfd/elf32-xtensa.c +++ b/bfd/elf32-xtensa.c @@ -1026,10 +1026,6 @@ elf_xtensa_check_relocs (bfd *abfd, 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; - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; } eh = elf_xtensa_hash_entry (h); diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c index 9b2ad36e756..8324af586e4 100644 --- a/bfd/elf64-alpha.c +++ b/bfd/elf64-alpha.c @@ -1838,7 +1838,6 @@ elf64_alpha_check_relocs (bfd *abfd, struct bfd_link_info *info, /* PR15323, ref flags aren't set for references in the same object. */ - h->root.root.non_ir_ref_regular = 1; h->root.ref_regular = 1; } diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c index 3f6dec1d728..aa6284ae577 100644 --- a/bfd/elf64-hppa.c +++ b/bfd/elf64-hppa.c @@ -644,7 +644,6 @@ elf64_hppa_check_relocs (bfd *abfd, /* PR15323, ref flags aren't set for references in the same object. */ - hh->eh.root.non_ir_ref_regular = 1; hh->eh.ref_regular = 1; } else diff --git a/bfd/elf64-ia64-vms.c b/bfd/elf64-ia64-vms.c index 1fc0957d4c2..220e9aa9685 100644 --- a/bfd/elf64-ia64-vms.c +++ b/bfd/elf64-ia64-vms.c @@ -2099,7 +2099,6 @@ elf64_ia64_check_relocs (bfd *abfd, struct bfd_link_info *info, /* PR15323, ref flags aren't set for references in the same object. */ - h->root.non_ir_ref_regular = 1; h->ref_regular = 1; } else diff --git a/bfd/elf64-mmix.c b/bfd/elf64-mmix.c index ae6afc20f1e..3783c50a09b 100644 --- a/bfd/elf64-mmix.c +++ b/bfd/elf64-mmix.c @@ -1986,10 +1986,6 @@ mmix_elf_check_relocs (bfd *abfd, 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; - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; } switch (ELF64_R_TYPE (rel->r_info)) diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 0eeea421e0a..2486390babf 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -5440,17 +5440,8 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, h = NULL; else { - struct ppc_link_hash_entry *eh; - h = sym_hashes[r_symndx - symtab_hdr->sh_info]; h = elf_follow_link (h); - eh = (struct ppc_link_hash_entry *) h; - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; - if (eh->is_func && eh->oh != NULL) - eh->oh->elf.root.non_ir_ref_regular = 1; if (h == htab->elf.hgot) sec->has_toc_reloc = 1; diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c index 5402a8d3948..0329c16b0e2 100644 --- a/bfd/elf64-s390.c +++ b/bfd/elf64-s390.c @@ -912,10 +912,6 @@ elf_s390_check_relocs (bfd *abfd, 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; - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; } /* Create got section and local_got_refcounts array if they diff --git a/bfd/elf64-sh64.c b/bfd/elf64-sh64.c index 7133144eeaa..3ed117fc2b6 100644 --- a/bfd/elf64-sh64.c +++ b/bfd/elf64-sh64.c @@ -2381,10 +2381,6 @@ sh_elf64_check_relocs (bfd *abfd, struct bfd_link_info *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; - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; } /* Some relocs require a global offset table. */ diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index d0af4ba4f6a..d47db319dd7 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c @@ -1899,7 +1899,6 @@ elf_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, { /* It is referenced by a non-shared object. */ h->ref_regular = 1; - h->root.non_ir_ref_regular = 1; if (h->type == STT_GNU_IFUNC) elf_tdata (info->output_bfd)->has_gnu_symbols diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c index ed402bb45e2..7f50f77837d 100644 --- a/bfd/elfnn-aarch64.c +++ b/bfd/elfnn-aarch64.c @@ -6994,10 +6994,6 @@ elfNN_aarch64_check_relocs (bfd *abfd, struct bfd_link_info *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; - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; } /* Could be done earlier, if h were already available. */ @@ -7053,7 +7049,6 @@ elfNN_aarch64_check_relocs (bfd *abfd, struct bfd_link_info *info, /* It is referenced by a non-shared object. */ h->ref_regular = 1; - h->root.non_ir_ref_regular = 1; } switch (bfd_r_type) diff --git a/bfd/elfnn-ia64.c b/bfd/elfnn-ia64.c index 0c441a8891a..1092b63ed36 100644 --- a/bfd/elfnn-ia64.c +++ b/bfd/elfnn-ia64.c @@ -2362,7 +2362,6 @@ elfNN_ia64_check_relocs (bfd *abfd, struct bfd_link_info *info, /* PR15323, ref flags aren't set for references in the same object. */ - h->root.non_ir_ref_regular = 1; h->ref_regular = 1; } else diff --git a/bfd/elfnn-riscv.c b/bfd/elfnn-riscv.c index 4be12be1fb1..6a56174cf6d 100644 --- a/bfd/elfnn-riscv.c +++ b/bfd/elfnn-riscv.c @@ -543,10 +543,6 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *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; - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; } switch (r_type) diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index c3b8ec9f49c..8745e6003c5 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -8403,10 +8403,6 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *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; - - /* PR15323, ref flags aren't set for references in the - same object. */ - h->root.non_ir_ref_regular = 1; } } diff --git a/bfd/elfxx-sparc.c b/bfd/elfxx-sparc.c index 856adebbac6..13aa6c5613d 100644 --- a/bfd/elfxx-sparc.c +++ b/bfd/elfxx-sparc.c @@ -1474,10 +1474,6 @@ _bfd_sparc_elf_check_relocs (bfd *abfd, struct bfd_link_info *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; - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; } if (h && h->type == STT_GNU_IFUNC) diff --git a/bfd/elfxx-tilegx.c b/bfd/elfxx-tilegx.c index b62fa334b12..5f6622aeb06 100644 --- a/bfd/elfxx-tilegx.c +++ b/bfd/elfxx-tilegx.c @@ -1718,10 +1718,6 @@ tilegx_elf_check_relocs (bfd *abfd, struct bfd_link_info *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; - - /* PR15323, ref flags aren't set for references in the same - object. */ - h->root.non_ir_ref_regular = 1; } r_type = tilegx_elf_tls_transition (info, r_type, h == NULL, -- 2.30.2