aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2015-04-29 11:10:45 +0100
committerNick Clifton <nickc@redhat.com>2015-04-29 11:10:45 +0100
commit5d239759c00a60a00986427b46c4f32e7fe3d616 (patch)
tree8a37988748903aeb6e2549528b73d8632b79b043 /gas
parent9081b64dc1b85a63466962adbc92d1c3e560a659 (diff)
downloadfsf-binutils-gdb-5d239759c00a60a00986427b46c4f32e7fe3d616.zip
fsf-binutils-gdb-5d239759c00a60a00986427b46c4f32e7fe3d616.tar.gz
fsf-binutils-gdb-5d239759c00a60a00986427b46c4f32e7fe3d616.tar.bz2
Updates the description of GAS's .set directive, to note that for some targets a symbolic value can only be set once.
* doc/as.texinfo (Set): Note that a symbol cannot be set multiple times if the expression is not constant and the target uses linker relaxation.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/doc/as.texinfo9
2 files changed, 14 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 2266429..1affd22 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,9 @@
+2015-04-29 Nick Clifton <nickc@redhat.com>
+
+ * doc/as.texinfo (Set): Note that a symbol cannot be set multiple
+ times if the expression is not constant and the target uses linker
+ relaxation.
+
2015-04-28 Renlin Li <renlin.li@arm.com>
* config/tc-arm.c (arm_init_frag): Always emit mapping symbols.
diff --git a/gas/doc/as.texinfo b/gas/doc/as.texinfo
index ffdb978..d09e88c 100644
--- a/gas/doc/as.texinfo
+++ b/gas/doc/as.texinfo
@@ -6351,7 +6351,14 @@ changes @var{symbol}'s value and type to conform to
@var{expression}. If @var{symbol} was flagged as external, it remains
flagged (@pxref{Symbol Attributes}).
-You may @code{.set} a symbol many times in the same assembly.
+You may @code{.set} a symbol many times in the same assembly provided that the
+values given to the symbol are constants. Values that are based on expressions
+involving other symbols are allowed, but some targets may restrict this to only
+being done once per assembly. This is because those targets do not set the
+addresses of symbols at assembly time, but rather delay the assignment until a
+final link is performed. This allows the linker a chance to change the code in
+the files, changing the location of, and the relative distance between, various
+different symbols.
If you @code{.set} a global symbol, the value stored in the object
file is the last value stored into it.