aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2016-09-20 10:49:39 +0100
committerAndrew Burgess <andrew.burgess@embecosm.com>2016-09-20 14:22:34 +0100
commita5bf7d4fe7a115a358528328b8d1ae221cd684fa (patch)
treeb69833ca19fcf5412f94992af9f62bce3601ed2f /ld
parent7d5adfe3118050243e85469ad891c7813e4db68a (diff)
downloadgdb-a5bf7d4fe7a115a358528328b8d1ae221cd684fa.zip
gdb-a5bf7d4fe7a115a358528328b8d1ae221cd684fa.tar.gz
gdb-a5bf7d4fe7a115a358528328b8d1ae221cd684fa.tar.bz2
ld: Extend documentation for EXCLUDE_FILE
There was a gap in the documentation of EXCLUDE_FILE that could cause confusion to a user. When writing an input section specifier like this: *(EXCLUDE_FILE (somefile.o) .text .text.*) this could mean one of the following: 1. All '.text' and '.text.*' from all files except for 'somefile.o', or 2. All '.text' from all files except 'somefile.o', and all '.text.*' sections from all files. It turns out that the second interpretation is correct, but the manual does not make this clear (to me at least). Hopefully this patch makes things clearer. ld/ChangeLog: * ld/ld.texinfo (Input Section Basics): Expand the description of EXCLUDE_FILE.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog5
-rw-r--r--ld/ld.texinfo15
2 files changed, 20 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 4bae998..7c24d65 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+2016-09-20 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * ld/ld.texinfo (Input Section Basics): Expand the description of
+ EXCLUDE_FILE.
+
2016-09-14 Thomas Preud'homme <thomas.preudhomme@arm.com>
* testsuite/ld-arm/cmse-veneers.s: Add a test for ARMv8-M Security
diff --git a/ld/ld.texinfo b/ld/ld.texinfo
index 5944b12..1303a0e 100644
--- a/ld/ld.texinfo
+++ b/ld/ld.texinfo
@@ -4214,6 +4214,21 @@ they are found in the linker input. In the second example, all
@samp{.text} input sections will appear first, followed by all
@samp{.rdata} input sections.
+When using EXCLUDE_FILE with more than one section, the exclusion only
+applies to the section immediately following, for example:
+@smallexample
+*(EXCLUDE_FILE (*somefile.o) .text .rdata)
+@end smallexample
+@noindent
+will cause all @samp{.text} sections from all files except
+@file{somefile.o} to be included, while all @samp{.rdata} sections
+from all files, including @file{somefile.o}, will be included. To
+exclude the @samp{.rdata} sections from @file{somefile.o} the example
+should be modified to:
+@smallexample
+*(EXCLUDE_FILE (*somefile.o) .text EXCLUDE_FILE (*somefile.o) .rdata)
+@end smallexample
+
You can specify a file name to include sections from a particular file.
You would do this if one or more of your files contain special data that
needs to be at a particular location in memory. For example: