diff options
author | Alan Modra <amodra@gmail.com> | 2016-10-04 10:43:50 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2016-10-04 10:43:50 +1030 |
commit | 94b41882b09a0b61c27cb0220ac31d9f5496e13c (patch) | |
tree | 1c9a274ffaaf601dc8e03c2e52badcc912703402 /ld/ld.texinfo | |
parent | 9ad39107ca6e4efcda0f48a6abf528844a2f11aa (diff) | |
download | gdb-94b41882b09a0b61c27cb0220ac31d9f5496e13c.zip gdb-94b41882b09a0b61c27cb0220ac31d9f5496e13c.tar.gz gdb-94b41882b09a0b61c27cb0220ac31d9f5496e13c.tar.bz2 |
ld expression section
Changes the result of ld expressions that were previously plain
numbers to be an absolute address, in the same circumstances where
numbers are treated as absolute addresses.
* ld.texinfo (Expression Section): Update result of arithmetic
expressions.
* ldexp.c (arith_result_section): New function.
(fold_binary): Use it.
Diffstat (limited to 'ld/ld.texinfo')
-rw-r--r-- | ld/ld.texinfo | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ld/ld.texinfo b/ld/ld.texinfo index 1303a0e..6528b6a 100644 --- a/ld/ld.texinfo +++ b/ld/ld.texinfo @@ -6032,7 +6032,9 @@ The result of comparisons, @samp{&&} and @samp{||} is also a number. @item The result of other binary arithmetic and logical operations on two relative addresses in the same section or two absolute addresses -(after above conversions) is also a number. +(after above conversions) is also a number when +@code{LD_FEATURE ("SANE_EXPR")} or inside an output section definition +but an absolute address otherwise. @item The result of other operations on relative addresses or one relative address and a number, is a relative address in the same |