This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: ld (bfd) bug: discarded N_EXCL stab in repeated link [PATCH]
- From: Nick Clifton <nickc at redhat dot com>
- To: mattias at virtutech dot se
- Cc: binutils at sources dot redhat dot com, bug-binutils at gnu dot org
- Date: Wed, 31 Mar 2004 09:45:16 +0100
- Subject: Re: ld (bfd) bug: discarded N_EXCL stab in repeated link [PATCH]
- References: <200403161809.i2GI9Tr11005@virtutech.se>
Hi Mattias,
> Sometimes ld throws away N_EXCL stabs found in the input file.
> This can occur when the input file is the result of a (partial) link.
> I ran into this bug when linking the Linux kernel.
>
> When a repeated include file is excluded, then the N_BINCL stab is
> changed to N_EXCL, and all the contained stabs up to and including the
> corresponding N_EINCL stab are removed. The bug is here that an N_EXCL
> stab (mark of a file that was excluded in a previous link) is also
> removed. This is always an error --- N_EXCL stabs must remain untouched
> in order for the include file number in stab types to be correct.
Thanks for reporting this bug and supplying a patch to fix it. I have
applied your patch along with this ChangeLog entry:
2004-03-31 Mattias Engdegard <mattias@virtutech.se>
* stabs.c (_bfd_link_section_stabs): Do not skip N_EXCL stabs.
Cheers
Nick