mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-21 01:12:32 +08:00
PR ld/15323
bfd/ * elf-m10300.c (mn10300_elf_check_relocs): Set non_ir_ref for global symbols referenced by relocs. * 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-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-openrisc.c (openrisc_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. * elfnn-ia64.c (elfNN_ia64_check_relocs): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise. * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise. * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise. Don't test indirect/warning links for NULL. ld/testsuite/ * ld-plugin/lto.exp (pr15323a.c): Compile without -flto rather than using -r to effectively strip out lto info.
This commit is contained in:
parent
9993ba115b
commit
81fbe831fe
@ -1,8 +1,63 @@
|
||||
2013-03-30 Alan Modra <amodra@gmail.com>
|
||||
|
||||
PR ld/15323
|
||||
* elf-m10300.c (mn10300_elf_check_relocs): Set non_ir_ref for
|
||||
global symbols referenced by relocs.
|
||||
* 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-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-openrisc.c (openrisc_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.
|
||||
* elfnn-ia64.c (elfNN_ia64_check_relocs): Likewise.
|
||||
* elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
|
||||
* elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
|
||||
* elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise. Don't
|
||||
test indirect/warning links for NULL.
|
||||
|
||||
2013-03-29 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR ld/15323
|
||||
* elf32-i386.c (elf_i386_check_relocs): Set non_ir_ref if a
|
||||
symbol is referenced by a non-shared object.
|
||||
symbol is referenced by a non-shared object.
|
||||
* elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
|
||||
|
||||
2013-03-28 Joe Seymour <jseymour@codesourcery.com>
|
||||
|
@ -1084,6 +1084,10 @@ 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 = 1;
|
||||
}
|
||||
|
||||
r_type = ELF32_R_TYPE (rel->r_info);
|
||||
|
@ -12465,6 +12465,10 @@ 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 = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1187,7 +1187,13 @@ bfin_check_relocs (bfd * abfd,
|
||||
if (r_symndx < symtab_hdr->sh_info)
|
||||
h = NULL;
|
||||
else
|
||||
h = sym_hashes[r_symndx - symtab_hdr->sh_info];
|
||||
{
|
||||
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 = 1;
|
||||
}
|
||||
|
||||
switch (ELF32_R_TYPE (rel->r_info))
|
||||
{
|
||||
|
@ -725,6 +725,10 @@ 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 = 1;
|
||||
}
|
||||
|
||||
/* Some relocs require a global offset table. */
|
||||
|
@ -3177,6 +3177,10 @@ 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 = 1;
|
||||
}
|
||||
|
||||
r_type = ELF32_R_TYPE (rel->r_info);
|
||||
|
@ -287,6 +287,10 @@ 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 = 1;
|
||||
}
|
||||
|
||||
switch (ELF32_R_TYPE (rel->r_info))
|
||||
|
@ -451,6 +451,10 @@ 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 = 1;
|
||||
}
|
||||
|
||||
switch (ELF32_R_TYPE (rel->r_info))
|
||||
|
@ -671,6 +671,10 @@ 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 = 1;
|
||||
}
|
||||
|
||||
switch (ELF32_R_TYPE (rel->r_info))
|
||||
|
@ -6046,6 +6046,10 @@ 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 = 1;
|
||||
}
|
||||
|
||||
switch (ELF32_R_TYPE (rel->r_info))
|
||||
|
@ -1169,6 +1169,10 @@ 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 = 1;
|
||||
}
|
||||
|
||||
r_type = ELF32_R_TYPE (rela->r_info);
|
||||
|
@ -825,6 +825,10 @@ 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 = 1;
|
||||
}
|
||||
|
||||
if (info->shared)
|
||||
|
@ -478,6 +478,10 @@ 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 = 1;
|
||||
}
|
||||
|
||||
switch (ELF32_R_TYPE (rel->r_info))
|
||||
|
@ -1305,6 +1305,10 @@ 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 = 1;
|
||||
}
|
||||
|
||||
/* Some relocs require a global offset table. */
|
||||
|
@ -621,6 +621,10 @@ 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 = 1;
|
||||
}
|
||||
|
||||
switch (ELF32_R_TYPE (rel->r_info))
|
||||
|
@ -3746,6 +3746,10 @@ 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 = 1;
|
||||
}
|
||||
|
||||
/* Some relocs require a global offset table. */
|
||||
|
@ -871,6 +871,10 @@ 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 = 1;
|
||||
}
|
||||
|
||||
switch (ELF32_R_TYPE (rel->r_info))
|
||||
|
@ -2584,6 +2584,10 @@ 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 = 1;
|
||||
}
|
||||
|
||||
switch (ELF32_R_TYPE (rel->r_info))
|
||||
|
@ -613,6 +613,10 @@ 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 = 1;
|
||||
}
|
||||
|
||||
switch (ELF32_R_TYPE (rel->r_info))
|
||||
|
@ -2141,6 +2141,10 @@ 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 = 1;
|
||||
}
|
||||
|
||||
/* Some relocs require a global offset table. */
|
||||
|
@ -2348,7 +2348,13 @@ microblaze_elf_check_relocs (bfd * abfd,
|
||||
if (r_symndx < symtab_hdr->sh_info)
|
||||
h = NULL;
|
||||
else
|
||||
h = sym_hashes [r_symndx - symtab_hdr->sh_info];
|
||||
{
|
||||
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 = 1;
|
||||
}
|
||||
|
||||
switch (r_type)
|
||||
{
|
||||
|
@ -356,6 +356,10 @@ 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 = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -266,6 +266,10 @@ 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 = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -453,6 +453,10 @@ 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 = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2601,6 +2601,10 @@ 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 = 1;
|
||||
}
|
||||
|
||||
r_type = ELF32_R_TYPE (rel->r_info);
|
||||
|
@ -486,6 +486,10 @@ openrisc_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 = 1;
|
||||
}
|
||||
|
||||
switch (ELF32_R_TYPE (rel->r_info))
|
||||
|
@ -3911,6 +3911,10 @@ 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 = 1;
|
||||
}
|
||||
|
||||
/* If a relocation refers to _GLOBAL_OFFSET_TABLE_, create the .got.
|
||||
|
@ -1198,6 +1198,10 @@ 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 = 1;
|
||||
}
|
||||
|
||||
switch (ELF32_R_TYPE (rel->r_info))
|
||||
|
@ -1026,6 +1026,10 @@ 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 = 1;
|
||||
}
|
||||
|
||||
/* Create got section and local_got_refcounts array if they
|
||||
|
@ -2837,6 +2837,10 @@ 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 = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2641,6 +2641,10 @@ 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 = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6031,6 +6031,10 @@ 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 = 1;
|
||||
}
|
||||
|
||||
r_type = sh_elf_optimized_tls_reloc (info, r_type, h == NULL);
|
||||
|
@ -2832,6 +2832,10 @@ 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 = 1;
|
||||
}
|
||||
|
||||
switch (r_type)
|
||||
|
@ -1521,6 +1521,10 @@ 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 = 1;
|
||||
}
|
||||
|
||||
r_type = tilepro_elf_tls_transition (info, r_type, h == NULL);
|
||||
|
@ -83,6 +83,10 @@ 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 = 1;
|
||||
}
|
||||
|
||||
r_type = ELF32_R_TYPE (rel->r_info);
|
||||
|
@ -585,6 +585,10 @@ 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 = 1;
|
||||
}
|
||||
|
||||
switch (ELF32_R_TYPE (rel->r_info))
|
||||
|
@ -437,6 +437,10 @@ 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 = 1;
|
||||
}
|
||||
|
||||
switch (ELF32_R_TYPE (rel->r_info))
|
||||
|
@ -1007,6 +1007,10 @@ 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 = 1;
|
||||
}
|
||||
eh = elf_xtensa_hash_entry (h);
|
||||
|
||||
|
@ -5192,6 +5192,10 @@ elf64_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 = 1;
|
||||
}
|
||||
|
||||
/* Could be done earlier, if h were already available. */
|
||||
|
@ -1812,6 +1812,9 @@ elf64_alpha_check_relocs (bfd *abfd, struct bfd_link_info *info,
|
||||
|| h->root.root.type == bfd_link_hash_warning)
|
||||
h = (struct alpha_elf_link_hash_entry *)h->root.root.u.i.link;
|
||||
|
||||
/* PR15323, ref flags aren't set for references in the same
|
||||
object. */
|
||||
h->root.root.non_ir_ref = 1;
|
||||
h->root.ref_regular = 1;
|
||||
}
|
||||
|
||||
|
@ -644,6 +644,9 @@ elf64_hppa_check_relocs (bfd *abfd,
|
||||
|| 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 = 1;
|
||||
hh->eh.ref_regular = 1;
|
||||
}
|
||||
else
|
||||
|
@ -2095,6 +2095,9 @@ elf64_ia64_check_relocs (bfd *abfd, struct bfd_link_info *info,
|
||||
|| 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 = 1;
|
||||
h->ref_regular = 1;
|
||||
}
|
||||
else
|
||||
|
@ -2009,6 +2009,10 @@ 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 = 1;
|
||||
}
|
||||
|
||||
switch (ELF64_R_TYPE (rel->r_info))
|
||||
|
@ -5004,6 +5004,10 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
|
||||
{
|
||||
h = sym_hashes[r_symndx - symtab_hdr->sh_info];
|
||||
h = elf_follow_link (h);
|
||||
|
||||
/* PR15323, ref flags aren't set for references in the same
|
||||
object. */
|
||||
h->root.non_ir_ref = 1;
|
||||
}
|
||||
|
||||
tls_type = 0;
|
||||
|
@ -950,6 +950,10 @@ 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 = 1;
|
||||
}
|
||||
|
||||
/* Create got section and local_got_refcounts array if they
|
||||
|
@ -2424,6 +2424,10 @@ 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 = 1;
|
||||
}
|
||||
|
||||
/* Some relocs require a global offset table. */
|
||||
|
@ -2352,6 +2352,9 @@ elfNN_ia64_check_relocs (bfd *abfd, struct bfd_link_info *info,
|
||||
|| 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 = 1;
|
||||
h->ref_regular = 1;
|
||||
}
|
||||
else
|
||||
|
@ -7814,10 +7814,16 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
|
||||
else
|
||||
{
|
||||
h = sym_hashes[r_symndx - extsymoff];
|
||||
while (h != NULL
|
||||
&& (h->root.type == bfd_link_hash_indirect
|
||||
|| h->root.type == bfd_link_hash_warning))
|
||||
h = (struct elf_link_hash_entry *) h->root.u.i.link;
|
||||
if (h != NULL)
|
||||
{
|
||||
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 = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Set CAN_MAKE_DYNAMIC_P to true if we can convert this
|
||||
|
@ -1450,6 +1450,10 @@ _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 = 1;
|
||||
}
|
||||
|
||||
if (h && h->type == STT_GNU_IFUNC)
|
||||
|
@ -1738,6 +1738,10 @@ 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 = 1;
|
||||
}
|
||||
|
||||
r_type = tilegx_elf_tls_transition (info, r_type, h == NULL,
|
||||
|
@ -1,3 +1,9 @@
|
||||
2013-03-30 Alan Modra <amodra@gmail.com>
|
||||
|
||||
PR ld/15323
|
||||
* ld-plugin/lto.exp (pr15323a.c): Compile without -flto rather
|
||||
than using -r to effectively strip out lto info.
|
||||
|
||||
2013-03-29 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR ld/15323
|
||||
|
@ -144,8 +144,8 @@ set lto_link_tests {
|
||||
"-flto -fuse-linker-plugin -Wl,--as-needed" "-flto"
|
||||
{pr13287.cc} {} "pr13287.exe" "c++"}
|
||||
{"PR ld/15323"
|
||||
"-O2 -flto -fuse-linker-plugin -r -nostdlib" "-O2 -flto"
|
||||
{pr15323a.c} {} "pr15323a-r.o" "c"}
|
||||
"" "-O2"
|
||||
{pr15323a.c} {} "libdummy.a" "c"}
|
||||
}
|
||||
|
||||
# Generate input files for complex LTO tests for ELF.
|
||||
@ -270,7 +270,7 @@ set lto_run_tests {
|
||||
"-O2 -flto -fuse-linker-plugin -Wl,--as-needed tmpdir/pr13201.o -lm" ""
|
||||
{dummy.c} "pr13201.exe" "pr13201.out" "" "c"}
|
||||
{"PR ld/15323"
|
||||
"-O2 -flto -fuse-linker-plugin -Wl,--as-needed tmpdir/pr15323a-r.o" ""
|
||||
"-O2 -flto -fuse-linker-plugin tmpdir/pr15323a.o" ""
|
||||
{pr15323b.c} "pr15323.exe" "pr15323.out" "-flto -O2" "c"}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user