public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Question about EXCLUDE FILE in ld script
@ 2008-10-21 14:34 loody
  2008-10-21 22:09 ` Alan Modra
  0 siblings, 1 reply; 4+ messages in thread
From: loody @ 2008-10-21 14:34 UTC (permalink / raw)
  To: binutils

Dear all:
I read ld.pdf and there is a chapter describes the usage of EXCLUDE FILE

"To exclude a list of files from
matching the file name wildcard, EXCLUDE FILE may be used to match all
files except
the ones specified in the EXCLUDE FILE list. For example:
*(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".
We are going to exclude 2 files, cretend.o and otherfile.o.
if we add * in front to file name, we may interpret it as
"xxxcretend.o" and "xxxotherfile.o", since we use * as wildcard.
Or Is this a rule to specify file name in EXCLUDE_FILE?

appreciate your help,
miloody

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Question about EXCLUDE FILE in ld script
  2008-10-21 14:34 Question about EXCLUDE FILE in ld script loody
@ 2008-10-21 22:09 ` Alan Modra
  2008-10-22  0:40   ` vichy
  0 siblings, 1 reply; 4+ messages in thread
From: Alan Modra @ 2008-10-21 22:09 UTC (permalink / raw)
  To: loody; +Cc: binutils

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.

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Question about EXCLUDE FILE in ld script
  2008-10-21 22:09 ` Alan Modra
@ 2008-10-22  0:40   ` vichy
  2009-05-13  8:46     ` loody
  0 siblings, 1 reply; 4+ messages in thread
From: vichy @ 2008-10-22  0:40 UTC (permalink / raw)
  To: loody, binutils

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,

vichy

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Question about EXCLUDE FILE in ld script
  2008-10-22  0:40   ` vichy
@ 2009-05-13  8:46     ` loody
  0 siblings, 0 replies; 4+ messages in thread
From: loody @ 2009-05-13  8:46 UTC (permalink / raw)
  To: vichy; +Cc: binutils

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-05-13  8:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-21 14:34 Question about EXCLUDE FILE in ld script loody
2008-10-21 22:09 ` Alan Modra
2008-10-22  0:40   ` vichy
2009-05-13  8:46     ` loody

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).