This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PATCH: PR ld/4409: --unresolved-symbols=ignore-all issues on ia64
- From: "H. J. Lu" <hjl at lucon dot org>
- To: binutils at sources dot redhat dot com
- Date: Wed, 9 May 2007 21:14:20 -0700
- Subject: PATCH: PR ld/4409: --unresolved-symbols=ignore-all issues on ia64
When an error from RELOC_FOR_GLOBAL_SYMBOL in executable is ignored
on ia64, we shouldn't continue since unresolved symbol in executable
is fatal on ia64. This patch fixes it.
H.J.
-----
bfd/
2007-05-09 H.J. Lu <hongjiu.lu@intel.com>
PR ld/4409
* elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add an argument for
error ignored.
* elf-m10200.c (mn10200_elf_relocate_section): Updated.
* elf-m10300.c (mn10300_elf_relocate_section): Likewise.
* elf32-arm.c (elf32_arm_relocate_section): Likewise.
* elf32-avr.c (elf32_avr_relocate_section): Likewise.
* elf32-bfin.c (bfinfdpic_relocate_section): Likewise.
(bfin_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-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-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-mt.c (mt_elf_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-spu.c (spu_elf_relocate_section): Likewise.
* elf32-v850.c (v850_elf_relocate_section): Likewise.
* elf32-vax.c (elf_vax_relocate_section): Likewise.
* elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
* elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
* elf32-xtensa.c (elf_xtensa_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-x86-64.c (elf64_x86_64_relocate_section): Likewise.
* elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
* elfxx-ia64.c (elfNN_ia64_relocate_section): Skip if error
from RELOC_FOR_GLOBAL_SYMBOL in executable is ignored.
ld/testsuite/
2007-05-09 H.J. Lu <hongjiu.lu@intel.com>
PR ld/4409
* ld-ia64/error1.d: New file.
* ld-ia64/error1.s: Likewise.
--- binutils/bfd/elf-bfd.h.error 2007-05-09 10:54:22.000000000 -0700
+++ binutils/bfd/elf-bfd.h 2007-05-09 18:49:25.000000000 -0700
@@ -1994,7 +1994,7 @@ extern bfd_boolean _sh_elf_set_mach_from
#define RELOC_FOR_GLOBAL_SYMBOL(info, input_bfd, input_section, rel, \
r_symndx, symtab_hdr, sym_hashes, \
h, sec, relocation, \
- unresolved_reloc, warned) \
+ unresolved_reloc, warned, ignored) \
do \
{ \
/* It seems this can happen with erroneous or unsupported \
@@ -2009,6 +2009,7 @@ extern bfd_boolean _sh_elf_set_mach_from
h = (struct elf_link_hash_entry *) h->root.u.i.link; \
\
warned = FALSE; \
+ ignored = FALSE; \
unresolved_reloc = FALSE; \
relocation = 0; \
if (h->root.type == bfd_link_hash_defined \
@@ -2031,7 +2032,7 @@ extern bfd_boolean _sh_elf_set_mach_from
; \
else if (info->unresolved_syms_in_objects == RM_IGNORE \
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT) \
- ; \
+ ignored = TRUE; \
else if (!info->relocatable) \
{ \
bfd_boolean err; \
--- binutils/bfd/elf-m10200.c.error 2007-04-26 08:57:29.000000000 -0700
+++ binutils/bfd/elf-m10200.c 2007-05-09 18:58:04.000000000 -0700
@@ -391,12 +391,12 @@ mn10200_elf_relocate_section (output_bfd
}
else
{
- bfd_boolean unresolved_reloc, warned;
+ bfd_boolean unresolved_reloc, warned, ignored;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
- unresolved_reloc, warned);
+ unresolved_reloc, warned, ignored);
}
if (sec != NULL && elf_discarded_section (sec))
--- binutils/bfd/elf-m10300.c.error 2007-04-26 08:57:29.000000000 -0700
+++ binutils/bfd/elf-m10300.c 2007-05-09 18:58:16.000000000 -0700
@@ -1416,13 +1416,13 @@ mn10300_elf_relocate_section (output_bfd
else
{
bfd_boolean unresolved_reloc;
- bfd_boolean warned;
+ bfd_boolean warned, ignored;
struct elf_link_hash_entry *hh;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
hh, sec, relocation,
- unresolved_reloc, warned);
+ unresolved_reloc, warned, ignored);
h = (struct elf32_mn10300_link_hash_entry *) hh;
--- binutils/bfd/elf32-arm.c.error 2007-05-09 06:26:57.000000000 -0700
+++ binutils/bfd/elf32-arm.c 2007-05-09 18:50:10.000000000 -0700
@@ -6626,12 +6626,12 @@ elf32_arm_relocate_section (bfd *
}
else
{
- bfd_boolean warned;
+ bfd_boolean warned, ignored;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
- unresolved_reloc, warned);
+ unresolved_reloc, warned, ignored);
sym_type = h->type;
}
--- binutils/bfd/elf32-avr.c.error 2007-04-26 08:57:29.000000000 -0700
+++ binutils/bfd/elf32-avr.c 2007-05-09 18:50:25.000000000 -0700
@@ -1204,12 +1204,12 @@ elf32_avr_relocate_section (bfd *output_
}
else
{
- bfd_boolean unresolved_reloc, warned;
+ bfd_boolean unresolved_reloc, warned, ignored;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
- unresolved_reloc, warned);
+ unresolved_reloc, warned, ignored);
name = h->root.root.string;
}
--- binutils/bfd/elf32-bfin.c.error 2007-04-26 08:57:29.000000000 -0700
+++ binutils/bfd/elf32-bfin.c 2007-05-09 20:04:41.000000000 -0700
@@ -2197,13 +2197,13 @@ bfinfdpic_relocate_section (bfd * output
}
else
{
- bfd_boolean warned;
+ bfd_boolean warned, ignored;
bfd_boolean unresolved_reloc;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
- unresolved_reloc, warned);
+ unresolved_reloc, warned, ignored);
osec = sec;
}
@@ -2895,12 +2895,12 @@ bfin_relocate_section (bfd * output_bfd,
}
else
{
- bfd_boolean warned;
+ bfd_boolean warned, ignored;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
- unresolved_reloc, warned);
+ unresolved_reloc, warned, ignored);
}
if (sec != NULL && elf_discarded_section (sec))
--- binutils/bfd/elf32-cr16c.c.error 2007-04-26 08:57:29.000000000 -0700
+++ binutils/bfd/elf32-cr16c.c 2007-05-09 18:50:46.000000000 -0700
@@ -717,12 +717,12 @@ elf32_cr16c_relocate_section (bfd *outpu
}
else
{
- bfd_boolean unresolved_reloc, warned;
+ bfd_boolean unresolved_reloc, warned, ignored;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
- unresolved_reloc, warned);
+ unresolved_reloc, warned, ignored);
}
if (sec != NULL && elf_discarded_section (sec))
--- binutils/bfd/elf32-cris.c.error 2007-04-26 08:57:30.000000000 -0700
+++ binutils/bfd/elf32-cris.c 2007-05-09 18:51:00.000000000 -0700
@@ -995,13 +995,13 @@ cris_elf_relocate_section (output_bfd, i
}
else
{
- bfd_boolean warned;
+ bfd_boolean warned, ignored;
bfd_boolean unresolved_reloc;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
- unresolved_reloc, warned);
+ unresolved_reloc, warned, ignored);
if (unresolved_reloc
/* Perhaps we should detect the cases that
--- binutils/bfd/elf32-crx.c.error 2007-04-26 08:57:30.000000000 -0700
+++ binutils/bfd/elf32-crx.c 2007-05-09 18:51:09.000000000 -0700
@@ -868,12 +868,12 @@ elf32_crx_relocate_section (bfd *output_
}
else
{
- bfd_boolean unresolved_reloc, warned;
+ bfd_boolean unresolved_reloc, warned, ignored;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
- unresolved_reloc, warned);
+ unresolved_reloc, warned, ignored);
}
if (sec != NULL && elf_discarded_section (sec))
--- binutils/bfd/elf32-d10v.c.error 2007-04-26 08:57:30.000000000 -0700
+++ binutils/bfd/elf32-d10v.c 2007-05-09 18:51:18.000000000 -0700
@@ -456,12 +456,12 @@ elf32_d10v_relocate_section (bfd *output
}
else
{
- bfd_boolean unresolved_reloc, warned;
+ bfd_boolean unresolved_reloc, warned, ignored;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
- unresolved_reloc, warned);
+ unresolved_reloc, warned, ignored);
}
if (sec != NULL && elf_discarded_section (sec))
--- binutils/bfd/elf32-fr30.c.error 2007-04-26 08:57:30.000000000 -0700
+++ binutils/bfd/elf32-fr30.c 2007-05-09 18:51:27.000000000 -0700
@@ -566,12 +566,12 @@ fr30_elf_relocate_section (output_bfd, i
}
else
{
- bfd_boolean unresolved_reloc, warned;
+ bfd_boolean unresolved_reloc, warned, ignored;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
- unresolved_reloc, warned);
+ unresolved_reloc, warned, ignored);
name = h->root.root.string;
}
--- binutils/bfd/elf32-frv.c.error 2007-05-08 13:51:54.000000000 -0700
+++ binutils/bfd/elf32-frv.c 2007-05-09 18:51:38.000000000 -0700
@@ -2812,13 +2812,13 @@ elf32_frv_relocate_section (output_bfd,
}
else
{
- bfd_boolean warned;
+ bfd_boolean warned, ignored;
bfd_boolean unresolved_reloc;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
- unresolved_reloc, warned);
+ unresolved_reloc, warned, ignored);
osec = sec;
}
--- binutils/bfd/elf32-h8300.c.error 2007-04-26 08:57:30.000000000 -0700
+++ binutils/bfd/elf32-h8300.c 2007-05-09 18:51:47.000000000 -0700
@@ -451,12 +451,12 @@ elf32_h8_relocate_section (bfd *output_b
}
else
{
- bfd_boolean unresolved_reloc, warned;
+ bfd_boolean unresolved_reloc, warned, ignored;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
- unresolved_reloc, warned);
+ unresolved_reloc, warned, ignored);
}
if (sec != NULL && elf_discarded_section (sec))
--- binutils/bfd/elf32-hppa.c.error 2007-04-26 08:57:30.000000000 -0700
+++ binutils/bfd/elf32-hppa.c 2007-05-09 18:52:02.000000000 -0700
@@ -3697,13 +3697,14 @@ elf32_hppa_relocate_section (bfd *output
else
{
struct elf_link_hash_entry *eh;
- bfd_boolean unresolved_reloc;
+ bfd_boolean unresolved_reloc, ignored;
struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (input_bfd);
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rela,
r_symndx, symtab_hdr, sym_hashes,
eh, sym_sec, relocation,
- unresolved_reloc, warned_undef);
+ unresolved_reloc, warned_undef,
+ ignored);
if (!info->relocatable
&& relocation == 0
--- binutils/bfd/elf32-i386.c.error 2007-05-09 10:54:22.000000000 -0700
+++ binutils/bfd/elf32-i386.c 2007-05-09 18:52:13.000000000 -0700
@@ -2383,12 +2383,12 @@ elf_i386_relocate_section (bfd *output_b
}
else
{
- bfd_boolean warned;
+ bfd_boolean warned, ignored;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
- unresolved_reloc, warned);
+ unresolved_reloc, warned, ignored);
}
if (sec != NULL && elf_discarded_section (sec))
--- binutils/bfd/elf32-i860.c.error 2007-04-26 08:57:30.000000000 -0700
+++ binutils/bfd/elf32-i860.c 2007-05-09 18:52:22.000000000 -0700
@@ -1119,12 +1119,12 @@ elf32_i860_relocate_section (bfd *output
}
else
{
- bfd_boolean unresolved_reloc, warned;
+ bfd_boolean unresolved_reloc, warned, ignored;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
- unresolved_reloc, warned);
+ unresolved_reloc, warned, ignored);
}
if (sec != NULL && elf_discarded_section (sec))
--- binutils/bfd/elf32-ip2k.c.error 2007-04-26 08:57:30.000000000 -0700
+++ binutils/bfd/elf32-ip2k.c 2007-05-09 18:52:34.000000000 -0700
@@ -1449,13 +1449,13 @@ ip2k_elf_relocate_section (bfd *output_b
}
else
{
- bfd_boolean warned;
+ bfd_boolean warned, ignored;
bfd_boolean unresolved_reloc;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
- unresolved_reloc, warned);
+ unresolved_reloc, warned, ignored);
name = h->root.root.string;
}
--- binutils/bfd/elf32-iq2000.c.error 2007-04-26 08:57:30.000000000 -0700
+++ binutils/bfd/elf32-iq2000.c 2007-05-09 18:52:47.000000000 -0700
@@ -586,12 +586,12 @@ iq2000_elf_relocate_section (bfd *
else
{
bfd_boolean unresolved_reloc;
- bfd_boolean warned;
+ bfd_boolean warned, ignored;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
- unresolved_reloc, warned);
+ unresolved_reloc, warned, ignored);
name = h->root.root.string;
}
--- binutils/bfd/elf32-m68hc1x.c.error 2007-04-26 08:57:30.000000000 -0700
+++ binutils/bfd/elf32-m68hc1x.c 2007-05-09 18:52:57.000000000 -0700
@@ -944,12 +944,12 @@ elf32_m68hc11_relocate_section (bfd *out
}
else
{
- bfd_boolean unresolved_reloc, warned;
+ bfd_boolean unresolved_reloc, warned, ignored;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation, unresolved_reloc,
- warned);
+ warned, ignored);
is_far = (h && (h->other & STO_M68HC12_FAR));
stub_name = h->root.root.string;
--- binutils/bfd/elf32-m68k.c.error 2007-04-26 08:57:30.000000000 -0700
+++ binutils/bfd/elf32-m68k.c 2007-05-09 18:53:19.000000000 -0700
@@ -1667,12 +1667,12 @@ elf_m68k_relocate_section (output_bfd, i
}
else
{
- bfd_boolean warned;
+ bfd_boolean warned, ignored;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
- unresolved_reloc, warned);
+ unresolved_reloc, warned, ignored);
}
if (sec != NULL && elf_discarded_section (sec))
--- binutils/bfd/elf32-mcore.c.error 2007-04-26 08:57:30.000000000 -0700
+++ binutils/bfd/elf32-mcore.c 2007-05-09 18:53:30.000000000 -0700
@@ -457,12 +457,12 @@ mcore_elf_relocate_section (bfd * output
}
else
{
- bfd_boolean unresolved_reloc, warned;
+ bfd_boolean unresolved_reloc, warned, ignored;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
- unresolved_reloc, warned);
+ unresolved_reloc, warned, ignored);
}
if (sec != NULL && elf_discarded_section (sec))
--- binutils/bfd/elf32-msp430.c.error 2007-04-26 08:57:30.000000000 -0700
+++ binutils/bfd/elf32-msp430.c 2007-05-09 18:53:38.000000000 -0700
@@ -449,12 +449,12 @@ elf32_msp430_relocate_section (bfd * out
}
else
{
- bfd_boolean unresolved_reloc, warned;
+ bfd_boolean unresolved_reloc, warned, ignored;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
- unresolved_reloc, warned);
+ unresolved_reloc, warned, ignored);
}
if (sec != NULL && elf_discarded_section (sec))
--- binutils/bfd/elf32-mt.c.error 2007-04-26 08:57:30.000000000 -0700
+++ binutils/bfd/elf32-mt.c 2007-05-09 18:53:49.000000000 -0700
@@ -343,12 +343,12 @@ mt_elf_relocate_section
else
{
bfd_boolean unresolved_reloc;
- bfd_boolean warned;
+ bfd_boolean warned, ignored;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
- unresolved_reloc, warned);
+ unresolved_reloc, warned, ignored);
name = h->root.root.string;
}
--- binutils/bfd/elf32-openrisc.c.error 2007-04-26 08:57:30.000000000 -0700
+++ binutils/bfd/elf32-openrisc.c 2007-05-09 18:53:57.000000000 -0700
@@ -365,12 +365,12 @@ openrisc_elf_relocate_section (bfd *outp
}
else
{
- bfd_boolean unresolved_reloc, warned;
+ bfd_boolean unresolved_reloc, warned, ignored;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
- unresolved_reloc, warned);
+ unresolved_reloc, warned, ignored);
}
if (sec != NULL && elf_discarded_section (sec))
--- binutils/bfd/elf32-ppc.c.error 2007-04-26 08:57:30.000000000 -0700
+++ binutils/bfd/elf32-ppc.c 2007-05-09 18:54:23.000000000 -0700
@@ -5627,10 +5627,12 @@ ppc_elf_relocate_section (bfd *output_bf
}
else
{
+ bfd_boolean ignored;
+
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
- unresolved_reloc, warned);
+ unresolved_reloc, warned, ignored);
sym_name = h->root.root.string;
}
--- binutils/bfd/elf32-s390.c.error 2007-04-26 08:57:31.000000000 -0700
+++ binutils/bfd/elf32-s390.c 2007-05-09 18:54:46.000000000 -0700
@@ -2332,11 +2332,12 @@ elf_s390_relocate_section (output_bfd, i
else
{
bfd_boolean warned ATTRIBUTE_UNUSED;
+ bfd_boolean ignored ATTRIBUTE_UNUSED;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
- unresolved_reloc, warned);
+ unresolved_reloc, warned, ignored);
}
if (sec != NULL && elf_discarded_section (sec))
--- binutils/bfd/elf32-spu.c.error 2007-05-08 13:51:55.000000000 -0700
+++ binutils/bfd/elf32-spu.c 2007-05-09 18:55:09.000000000 -0700
@@ -2685,10 +2685,12 @@ spu_elf_relocate_section (bfd *output_bf
}
else
{
+ bfd_boolean ignored;
+
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
- unresolved_reloc, warned);
+ unresolved_reloc, warned, ignored);
sym_name = h->root.root.string;
}
--- binutils/bfd/elf32-v850.c.error 2007-04-26 08:57:31.000000000 -0700
+++ binutils/bfd/elf32-v850.c 2007-05-09 18:55:24.000000000 -0700
@@ -1623,7 +1623,7 @@ v850_elf_relocate_section (bfd *output_b
}
else
{
- bfd_boolean unresolved_reloc, warned;
+ bfd_boolean unresolved_reloc, warned, ignored;
/* Note - this check is delayed until now as it is possible and
valid to have a file without any symbols but with relocs that
@@ -1640,7 +1640,7 @@ v850_elf_relocate_section (bfd *output_b
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
- unresolved_reloc, warned);
+ unresolved_reloc, warned, ignored);
}
if (sec != NULL && elf_discarded_section (sec))
--- binutils/bfd/elf32-vax.c.error 2007-04-26 08:57:31.000000000 -0700
+++ binutils/bfd/elf32-vax.c 2007-05-09 18:55:34.000000000 -0700
@@ -1436,12 +1436,12 @@ elf_vax_relocate_section (bfd *output_bf
else
{
bfd_boolean unresolved_reloc;
- bfd_boolean warned;
+ bfd_boolean warned, ignored;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
- unresolved_reloc, warned);
+ unresolved_reloc, warned, ignored);
if ((h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak)
--- binutils/bfd/elf32-xc16x.c.error 2007-04-26 08:57:31.000000000 -0700
+++ binutils/bfd/elf32-xc16x.c 2007-05-09 18:55:43.000000000 -0700
@@ -373,12 +373,12 @@ elf32_xc16x_relocate_section (bfd *outpu
}
else
{
- bfd_boolean unresolved_reloc, warned;
+ bfd_boolean unresolved_reloc, warned, ignored;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
- unresolved_reloc, warned);
+ unresolved_reloc, warned, ignored);
}
if (sec != NULL && elf_discarded_section (sec))
--- binutils/bfd/elf32-xstormy16.c.error 2007-04-26 08:57:31.000000000 -0700
+++ binutils/bfd/elf32-xstormy16.c 2007-05-09 18:55:53.000000000 -0700
@@ -821,12 +821,12 @@ xstormy16_elf_relocate_section (bfd *
}
else
{
- bfd_boolean unresolved_reloc, warned;
+ bfd_boolean unresolved_reloc, warned, ignored;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
- unresolved_reloc, warned);
+ unresolved_reloc, warned, ignored);
}
if (sec != NULL && elf_discarded_section (sec))
--- binutils/bfd/elf32-xtensa.c.error 2007-04-27 16:19:35.000000000 -0700
+++ binutils/bfd/elf32-xtensa.c 2007-05-09 18:56:10.000000000 -0700
@@ -2055,10 +2055,12 @@ elf_xtensa_relocate_section (bfd *output
}
else
{
+ bfd_boolean ignored;
+
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
- unresolved_reloc, warned);
+ unresolved_reloc, warned, ignored);
if (relocation == 0
&& !unresolved_reloc
--- binutils/bfd/elf64-alpha.c.error 2007-04-26 08:57:31.000000000 -0700
+++ binutils/bfd/elf64-alpha.c 2007-05-09 18:56:23.000000000 -0700
@@ -4174,7 +4174,7 @@ elf64_alpha_relocate_section (bfd *outpu
}
else
{
- bfd_boolean warned;
+ bfd_boolean warned, ignored;
bfd_boolean unresolved_reloc;
struct elf_link_hash_entry *hh;
struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (input_bfd);
@@ -4182,7 +4182,7 @@ elf64_alpha_relocate_section (bfd *outpu
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
hh, sec, value,
- unresolved_reloc, warned);
+ unresolved_reloc, warned, ignored);
if (warned)
continue;
--- binutils/bfd/elf64-mmix.c.error 2007-04-26 08:57:31.000000000 -0700
+++ binutils/bfd/elf64-mmix.c 2007-05-09 18:56:37.000000000 -0700
@@ -1400,12 +1400,13 @@ mmix_elf_relocate_section (output_bfd, i
}
else
{
- bfd_boolean unresolved_reloc;
+ bfd_boolean unresolved_reloc, ignored;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
- unresolved_reloc, undefined_signalled);
+ unresolved_reloc, undefined_signalled,
+ ignored);
name = h->root.root.string;
}
--- binutils/bfd/elf64-ppc.c.error 2007-04-26 08:57:31.000000000 -0700
+++ binutils/bfd/elf64-ppc.c 2007-05-09 18:56:50.000000000 -0700
@@ -9916,10 +9916,12 @@ ppc64_elf_relocate_section (bfd *output_
}
else
{
+ bfd_boolean ignored;
+
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h_elf, sec, relocation,
- unresolved_reloc, warned);
+ unresolved_reloc, warned, ignored);
sym_name = h_elf->root.root.string;
sym_type = h_elf->type;
}
--- binutils/bfd/elf64-s390.c.error 2007-04-26 08:57:32.000000000 -0700
+++ binutils/bfd/elf64-s390.c 2007-05-09 18:57:02.000000000 -0700
@@ -2306,11 +2306,12 @@ elf_s390_relocate_section (output_bfd, i
else
{
bfd_boolean warned ATTRIBUTE_UNUSED;
+ bfd_boolean ignored ATTRIBUTE_UNUSED;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
- unresolved_reloc, warned);
+ unresolved_reloc, warned, ignored);
}
if (sec != NULL && elf_discarded_section (sec))
--- binutils/bfd/elf64-x86-64.c.error 2007-05-09 10:54:22.000000000 -0700
+++ binutils/bfd/elf64-x86-64.c 2007-05-09 18:57:19.000000000 -0700
@@ -2148,12 +2148,12 @@ elf64_x86_64_relocate_section (bfd *outp
}
else
{
- bfd_boolean warned;
+ bfd_boolean warned, ignored;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
- unresolved_reloc, warned);
+ unresolved_reloc, warned, ignored);
}
if (sec != NULL && elf_discarded_section (sec))
--- binutils/bfd/elfxx-ia64.c.error 2007-05-09 10:54:22.000000000 -0700
+++ binutils/bfd/elfxx-ia64.c 2007-05-09 21:03:12.000000000 -0700
@@ -4663,17 +4663,17 @@ elfNN_ia64_relocate_section (output_bfd,
else
{
bfd_boolean unresolved_reloc;
- bfd_boolean warned;
+ bfd_boolean warned, ignored;
struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (input_bfd);
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h, sym_sec, value,
- unresolved_reloc, warned);
+ unresolved_reloc, warned, ignored);
if (h->root.type == bfd_link_hash_undefweak)
undef_weak_ref = TRUE;
- else if (warned)
+ else if (warned || (ignored && info->executable))
continue;
}
--- binutils/bfd/elfxx-sparc.c.error 2007-04-26 08:57:32.000000000 -0700
+++ binutils/bfd/elfxx-sparc.c 2007-05-09 18:59:10.000000000 -0700
@@ -2552,12 +2552,12 @@ _bfd_sparc_elf_relocate_section (bfd *ou
}
else
{
- bfd_boolean warned;
+ bfd_boolean warned, ignored;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h, sec, relocation,
- unresolved_reloc, warned);
+ unresolved_reloc, warned, ignored);
if (warned)
{
/* To avoid generating warning messages about truncated
--- binutils/ld/testsuite/ld-ia64/error1.d.error 2007-05-09 20:30:37.000000000 -0700
+++ binutils/ld/testsuite/ld-ia64/error1.d 2007-05-09 20:30:14.000000000 -0700
@@ -0,0 +1,7 @@
+#source: error1.s
+#ld: -unresolved-symbols=ignore-all
+#readelf: -s
+
+#...
+[ ]+[0-9]+:[ ]+[0]+[ ]+0[ ]+NOTYPE[ ]+GLOBAL DEFAULT[ ]+UND[ ]+foo
+#pass
--- binutils/ld/testsuite/ld-ia64/error1.s.error 2007-05-09 20:30:41.000000000 -0700
+++ binutils/ld/testsuite/ld-ia64/error1.s 2007-05-09 20:25:15.000000000 -0700
@@ -0,0 +1,33 @@
+ .explicit
+ .pred.safe_across_calls p1-p5,p16-p63
+ .text
+ .globl _start#
+ .proc _start#
+_start:
+ addl r14 = @ltoff(@tprel(sG2#)), gp
+ ;;
+ ld8 r14 = [r14]
+ ;;
+ add r14 = r14, r13
+ ;;
+
+ addl r14 = @ltoff(@tprel(bl1#)), gp
+ ;;
+ ld8 r14 = [r14]
+ ;;
+ add r14 = r14, r13
+ ;;
+
+ mov r2 = r13
+ ;;
+ addl r14 = @tprel(sg1#), r2
+ addl r15 = @tprel(bl2#) + 2, r2
+ ;;
+ adds r14 = @tprel(sh2#) + 3, r13
+ movl r15 = @tprel(bl2#) + 1
+ ;;
+ br.call.sptk.many b0 = foo#
+ ;;
+
+ br.ret.sptk.many b0;
+ .endp _start#