aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2021-08-11 15:17:48 +0930
committerAlan Modra <amodra@gmail.com>2021-08-11 19:41:01 +0930
commitfb0afe4ccacebb4062a9428a32051f3e077dfa14 (patch)
tree70e65103508b284f44aa4fb3edc9058bfc5403b9 /ld
parentd86d1fc7f988f52da4711a86c078194347ab6482 (diff)
downloadgdb-fb0afe4ccacebb4062a9428a32051f3e077dfa14.zip
gdb-fb0afe4ccacebb4062a9428a32051f3e077dfa14.tar.gz
gdb-fb0afe4ccacebb4062a9428a32051f3e077dfa14.tar.bz2
Mention whitespace in script expressions
Inside an output section statement, ld's parser can't tell whether a line .+=4; is an assignment to dot or a file named ".+=4". * ld.texi (expressions): Mention need for whitespace.
Diffstat (limited to 'ld')
-rw-r--r--ld/ld.texi8
1 files changed, 5 insertions, 3 deletions
diff --git a/ld/ld.texi b/ld/ld.texi
index 5471d95..71cfaa3 100644
--- a/ld/ld.texi
+++ b/ld/ld.texi
@@ -6286,9 +6286,11 @@ expect when you upgrade.
@cindex expressions
@cindex arithmetic
The syntax for expressions in the linker script language is identical to
-that of C expressions. All expressions are evaluated as integers. All
-expressions are evaluated in the same size, which is 32 bits if both the
-host and target are 32 bits, and is otherwise 64 bits.
+that of C expressions, except that whitespace is required in some
+places to resolve syntactic ambiguities. All expressions are
+evaluated as integers. All expressions are evaluated in the same
+size, which is 32 bits if both the host and target are 32 bits, and is
+otherwise 64 bits.
You can use and set symbol values in expressions.