This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Question about EXCLUDE FILE in ld script
- From: loody <miloody at gmail dot com>
- To: vichy <vichy dot kuo at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Wed, 13 May 2009 16:46:04 +0800
- Subject: Re: Question about EXCLUDE FILE in ld script
- References: <3a665c760810210733s631a440fhf5d4a8244678dde1@mail.gmail.com> <20081021220845.GL9946@bubble.grove.modra.org> <cd35b9e90810211739hc813a7egd9ee1aee3c56b354@mail.gmail.com>
hi:
2008/10/22 vichy <vichy.kuo@gmail.com>:
> 2008/10/22 Alan Modra <amodra@bigpond.net.au>:
>> On Tue, Oct 21, 2008 at 10:33:22PM +0800, loody wrote:
>>> *(EXCLUDE_FILE (*crtend.o *otherfile.o) .ctors)
>>> will cause all .ctors sections from all files except 'crtend.o' and
>>> 'otherfile.o' to be included. "
>>>
>>> My question is:
>>> Why we have to use "*crtend.o" and "*otherfile.o" instead of
>>> "crtend.o" and "otherfile.o".
>>
>> You don't need a wildcard here.
>
> so, it is the rule about using EXCLUDE_FILE.
> We have to add * in front of the file name we want to exclude.
> If I am wrong, please let me know.
> Sincerely Yours,
Thanks for your kind help.
Can I boldly say the Wildcard rule works in file name and section
name, but EXCLUDE command.
ex:
[a-b]*.o (EXCLUDE_FILE (*a1.o *b1.o) .data[1-2])
we include all the .data1 and .data2 sections in a*.o and b*.o,
except a1.o and b1.o these 2 files.
appreciate your help,
miloody