This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Question about EXCLUDE FILE in ld script


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]