aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2010-08-19 05:51:50 +0000
committerAlan Modra <amodra@gmail.com>2010-08-19 05:51:50 +0000
commit7542af2ae81ecd2b97dcaa7c66d0b0d85e359d88 (patch)
tree624e07d23b75bdbfe2d36ae5fb676dbedfa2724d /ld/testsuite
parent56f75c03fc85f2ce65c85793eba9a7cef1666f3c (diff)
downloadfsf-binutils-gdb-7542af2ae81ecd2b97dcaa7c66d0b0d85e359d88.zip
fsf-binutils-gdb-7542af2ae81ecd2b97dcaa7c66d0b0d85e359d88.tar.gz
fsf-binutils-gdb-7542af2ae81ecd2b97dcaa7c66d0b0d85e359d88.tar.bz2
binutils/
* NEWS: Mention change in linker script expression evaluation. ld/ * ld.texinfo (Expression Section): Detail expression evaluation. (Builtin Functions <ADDR>): Correct. (Builtin Functions <LOADADDR>): Don't mention LOADADDR normally the same as ADDR. (Builtin Functions <SEGMENT_START>): Typo fix. * ldexp.c (new_number): New function. (make_abs, exp_get_abs_int): Cope with NULL expld.result.section. (fold_unary <'~', '!', '-'>): Don't make_abs. (fold_binary): Simplify result section logic. Return NULL section for logical ops. (fold_binary <SEGMENT_START>): Use new_rel_from_abs to set value to a consistent result. (fold_name <SIZEOF_HEADERS>): Return new_number, not new_abs. (fold_name <DEFINED, SIZEOF, ALIGNOF, LENGTH, CONSTANT>): Likewise. (fold_name <NAME>): No need to handle absolute symbols differently from relative ones. (fold_name <ORIGIN>): Don't return valid result when lang_first_phase_enum. Return new_rel_from_abs, not new_abs. (exp_fold_tree_1 <etree_value>): Return new_number, not new_rel. (exp_fold_tree_1): Ajust for NULL expld.result.section. When assigning a plain number to dot, assume the value is relative to expld.section. Make terms not in an output section, absolute. * ldlang.c (print_assignment): Fix style nit. (lang_size_sections_1): Cope with NULL expld.result.section. (lang_do_assignments_1): Likewise. ld/testsuite/ * ld-scripts/memory.t: Remove ORIGIN fudge.
Diffstat (limited to 'ld/testsuite')
-rw-r--r--ld/testsuite/ChangeLog4
-rw-r--r--ld/testsuite/ld-scripts/memory.t14
2 files changed, 5 insertions, 13 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index c15a44e..dd7ee77 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2010-08-19 Alan Modra <amodra@gmail.com>
+
+ * ld-scripts/memory.t: Remove ORIGIN fudge.
+
2010-08-13 H.J. Lu <hongjiu.lu@intel.com>
PR ld/11913
diff --git a/ld/testsuite/ld-scripts/memory.t b/ld/testsuite/ld-scripts/memory.t
index 6623b28..129bd7c 100644
--- a/ld/testsuite/ld-scripts/memory.t
+++ b/ld/testsuite/ld-scripts/memory.t
@@ -15,19 +15,7 @@ SECTIONS
. = 0;
.text :
{
- /* The value returned by the ORIGIN operator is a constant.
- However it is being assigned to a symbol declared within
- a section. Therefore the symbol is section-relative and
- its value will include the offset of that section from
- the start of memory. ie the declaration:
- text_start = ORIGIN (TEXTMEM);
- here will result in text_start having a value of 0x200.
- Hence we need to subtract the absolute value of the
- location counter at this point in order to give text_start
- a value that is truely absolute, and which coincidentally
- will allow the tests in script.exp to work. */
-
- text_start = ORIGIN(TEXTMEM) - ABSOLUTE (.);
+ text_start = ORIGIN (TEXTMEM);
*(.text)
*(.pr)
text_end = .;