This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: binutils-2.19.92 snapshot is available
On Thu, Oct 08, 2009 at 03:37:23PM +1030, Alan Modra wrote:
> On Thu, Oct 08, 2009 at 01:35:27AM +0100, Dave Korn wrote:
> > match because PE has the odd habit of generating undefined references to
> > section symbols
>
> These are for discarded empty output sections. (See ldlang.c
> strip_excluded_output_sections.) COFF fix follows, but it's inside
> #ifndef COFF_WITH_PE so won't help PE. I'll commit this after a
> round of testing unless you object.
>
> Index: bfd/cofflink.c
> ===================================================================
> RCS file: /cvs/src/src/bfd/cofflink.c,v
> retrieving revision 1.72
> diff -u -p -r1.72 cofflink.c
> --- bfd/cofflink.c 1 Oct 2009 19:48:12 -0000 1.72
> +++ bfd/cofflink.c 8 Oct 2009 05:02:38 -0000
> @@ -1518,7 +1518,9 @@ _bfd_coff_link_input_bfd (struct coff_fi
> && isym.n_sclass == C_STAT
> && isym.n_type == T_NULL
> && isym.n_numaux > 0
> - && (*secpp)->output_section == bfd_abs_section_ptr)
> + && ((*secpp)->output_section == bfd_abs_section_ptr
> + || bfd_section_removed_from_list (output_bfd,
> + (*secpp)->output_section)))
> skip = TRUE;
> #endif
Committed with this changelog
* cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols for
excluded output sections.
--
Alan Modra
Australia Development Lab, IBM