This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: GNU ld docs -- incorrect EXCLUDE_FILE example?
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Oleg Katsitadze <olegkat at gmail dot com>
- Cc: bug-binutils at gnu dot org, binutils at sourceware dot org
- Date: Sat, 18 Aug 2007 11:01:55 +0930
- Subject: Re: GNU ld docs -- incorrect EXCLUDE_FILE example?
- References: <20070817220518.GA13884@thor>
On Sat, Aug 18, 2007 at 01:05:18AM +0300, Oleg Katsitadze wrote:
> Hi,
>
> I've found an example of using EXCLUDE_FILE in linker scripts in the
> GNU ld documentation:
>
> (*(EXCLUDE_FILE (*crtend.o *otherfile.o) .ctors))
>
> I've tried this, and several variations thereof, to no avail -- I
> always get "parse error". I put it in place of a usual `*(.data)',
> which until then was accepted by ld without any errors, so my script
> should be ok.
Yes, the info doc is wrong. The example should not have the outer
enclosing parentheses.
* ld.texinfo (Input Section Basics): Correct EXCLUDE_FILE example.
Index: ld/ld.texinfo
===================================================================
RCS file: /cvs/src/src/ld/ld.texinfo,v
retrieving revision 1.201
diff -u -p -r1.201 ld.texinfo
--- ld/ld.texinfo 25 Jul 2007 14:56:22 -0000 1.201
+++ ld/ld.texinfo 18 Aug 2007 01:30:33 -0000
@@ -3327,7 +3327,7 @@ of files from matching the file name wil
match all files except the ones specified in the EXCLUDE_FILE list. For
example:
@smallexample
-(*(EXCLUDE_FILE (*crtend.o *otherfile.o) .ctors))
+*(EXCLUDE_FILE (*crtend.o *otherfile.o) .ctors)
@end smallexample
will cause all .ctors sections from all files except @file{crtend.o} and
@file{otherfile.o} to be included.
--
Alan Modra
Australia Development Lab, IBM