From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30363 invoked by alias); 13 May 2009 08:46:12 -0000 Received: (qmail 30351 invoked by uid 22791); 13 May 2009 08:46:11 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from wf-out-1314.google.com (HELO wf-out-1314.google.com) (209.85.200.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 13 May 2009 08:46:06 +0000 Received: by wf-out-1314.google.com with SMTP id 23so341277wfg.24 for ; Wed, 13 May 2009 01:46:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.237.19 with SMTP id k19mr267938wfh.68.1242204364128; Wed, 13 May 2009 01:46:04 -0700 (PDT) In-Reply-To: References: <3a665c760810210733s631a440fhf5d4a8244678dde1@mail.gmail.com> <20081021220845.GL9946@bubble.grove.modra.org> Date: Wed, 13 May 2009 08:46:00 -0000 Message-ID: <3a665c760905130146w551fc3a8yc3194d8507b167d2@mail.gmail.com> Subject: Re: Question about EXCLUDE FILE in ld script From: loody To: vichy Cc: binutils@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2009-05/txt/msg00216.txt.bz2 hi: 2008/10/22 vichy : > 2008/10/22 Alan Modra : >> 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