This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: PR ld/4409: --unresolved-symbols=ignore-all issues on ia64
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: "H. J. Lu" <hjl at lucon dot org>
- Cc: binutils at sources dot redhat dot com
- Date: Thu, 10 May 2007 14:15:39 +0930
- Subject: Re: PATCH: PR ld/4409: --unresolved-symbols=ignore-all issues on ia64
- References: <20070510041420.GA25724@lucon.org>
On Wed, May 09, 2007 at 09:14:20PM -0700, H. J. Lu wrote:
> 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.
This would have been a lot less typing if you'd just changed
elfxx-ia64.c. The following does the same as your patch, I think.
Index: bfd/elfxx-ia64.c
===================================================================
RCS file: /cvs/src/src/bfd/elfxx-ia64.c,v
retrieving revision 1.198
diff -u -p -r1.198 elfxx-ia64.c
--- bfd/elfxx-ia64.c 26 Apr 2007 14:46:57 -0000 1.198
+++ bfd/elfxx-ia64.c 10 May 2007 04:39:41 -0000
@@ -4672,7 +4672,9 @@ elfNN_ia64_relocate_section (output_bfd,
if (h->root.type == bfd_link_hash_undefweak)
undef_weak_ref = TRUE;
- else if (warned)
+ else if (h->root.type != bfd_link_hash_defined
+ && h->root.type != bfd_link_hash_defweak
+ && (warned || info->executable))
continue;
}
--
Alan Modra
IBM OzLabs - Linux Technology Centre