[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GNU ld docs -- incorrect EXCLUDE_FILE example?
From: |
Alan Modra |
Subject: |
Re: GNU ld docs -- incorrect EXCLUDE_FILE example? |
Date: |
Sat, 18 Aug 2007 11:01:55 +0930 |
User-agent: |
Mutt/1.5.9i |
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