]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Mention whitespace in script expressions
authorAlan Modra <amodra@gmail.com>
Wed, 11 Aug 2021 05:47:48 +0000 (15:17 +0930)
committerAlan Modra <amodra@gmail.com>
Wed, 11 Aug 2021 10:11:01 +0000 (19:41 +0930)
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.

ld/ld.texi

index 5471d9588ed8a704d1a6298e8da3f0be63b3a407..71cfaa3d1b1d348f26b57a729471af30d261025c 100644 (file)
@@ -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.