aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2008-01-25 12:03:37 +0000
committerAlan Modra <amodra@gmail.com>2008-01-25 12:03:37 +0000
commit53d25da64b00c1cf7f10d04785d66fa003f8bfc9 (patch)
treeb1bad03e3da788202674fed0b1233f865cbad54d /ld/testsuite
parent5ca3b13d654923e893cb2661700bc06e7af32a49 (diff)
downloadgdb-53d25da64b00c1cf7f10d04785d66fa003f8bfc9.zip
gdb-53d25da64b00c1cf7f10d04785d66fa003f8bfc9.tar.gz
gdb-53d25da64b00c1cf7f10d04785d66fa003f8bfc9.tar.bz2
ld/
* ld.texinfo (INSERT): Describe. * ldgram.y (ldgram_in_script, ldgram_had_equals): Delete. (INSERT_K, AFTER, BEFORE): Add as tokens. (ifile_p1): Handle INSERT statements. (saved_script_handle, force_make_executable): Move to.. * ldmain.c: ..here. (previous_script_handle): New global var. * ldmain.h (saved_script_handle, force_make_executable): Declare. (previous_script_handle): Likewise. * ldlex.l (INSERT_K, AFTER, BEFORE): Add tokens. * lexsup.c (parge_args <-T>): Set previous_script_handle. * ldlang.c (lang_for_each_statement_worker): Handle insert statement. (map_input_to_output_sections, print_statement): Likewise. (lang_size_sections_1, lang_do_assignments_1): Likewise. (insert_os_after): New function, extracted from.. (lang_insert_orphan): ..here. (process_insert_statements): New function. (lang_process): Call it. (lang_add_insert): New function. * ldlang.h (lang_insert_statement_enum): New. (lang_insert_statement_type): New. (lang_statement_union_type): Add insert_statement. (lang_add_insert): Declare. ld/testsuite/ * ld-spu/ovl.lnk: Delete overlay. * ld-spu/ovl1.lnk: New file. * ld-spu/ovl2.lnk: New file. * ld-spu/ovl.d: Update. * ld-spu/ovl2.d: Update.
Diffstat (limited to 'ld/testsuite')
-rw-r--r--ld/testsuite/ChangeLog8
-rw-r--r--ld/testsuite/ld-spu/ovl.d2
-rw-r--r--ld/testsuite/ld-spu/ovl.lnk7
-rw-r--r--ld/testsuite/ld-spu/ovl1.lnk9
-rw-r--r--ld/testsuite/ld-spu/ovl2.d2
-rw-r--r--ld/testsuite/ld-spu/ovl2.lnk10
6 files changed, 29 insertions, 9 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index f55e310..bda99a2 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2008-01-25 Alan Modra <amodra@bigpond.net.au>
+
+ * ld-spu/ovl.lnk: Delete overlay.
+ * ld-spu/ovl1.lnk: New file.
+ * ld-spu/ovl2.lnk: New file.
+ * ld-spu/ovl.d: Update.
+ * ld-spu/ovl2.d: Update.
+
2008-01-23 Andreas Schwab <schwab@suse.de>
* ld-gc/gc.c: Make sure used_func is not inlined.
diff --git a/ld/testsuite/ld-spu/ovl.d b/ld/testsuite/ld-spu/ovl.d
index 0f3deb2..c624659 100644
--- a/ld/testsuite/ld-spu/ovl.d
+++ b/ld/testsuite/ld-spu/ovl.d
@@ -1,5 +1,5 @@
#source: ovl.s
-#ld: -N -T ovl.lnk --emit-relocs
+#ld: -N -T ovl1.lnk -T ovl.lnk --emit-relocs
#objdump: -D -r
.*elf32-spu
diff --git a/ld/testsuite/ld-spu/ovl.lnk b/ld/testsuite/ld-spu/ovl.lnk
index 408ed1e..0015652 100644
--- a/ld/testsuite/ld-spu/ovl.lnk
+++ b/ld/testsuite/ld-spu/ovl.lnk
@@ -2,13 +2,6 @@ SECTIONS
{
. = SIZEOF_HEADERS;
.text : { *(.text) *(.stub) }
-
- OVERLAY 0x400 :
- {
- .ov_a1 { *(.ov_a1) }
- .ov_a2 { *(.ov_a2) }
- }
-
.data : { *(.data) *(.ovtab) }
.bss : { *(.bss) }
}
diff --git a/ld/testsuite/ld-spu/ovl1.lnk b/ld/testsuite/ld-spu/ovl1.lnk
new file mode 100644
index 0000000..5fd4844
--- /dev/null
+++ b/ld/testsuite/ld-spu/ovl1.lnk
@@ -0,0 +1,9 @@
+SECTIONS
+{
+ OVERLAY 0x400 :
+ {
+ .ov_a1 { *(.ov_a1) }
+ .ov_a2 { *(.ov_a2) }
+ }
+}
+INSERT AFTER .text;
diff --git a/ld/testsuite/ld-spu/ovl2.d b/ld/testsuite/ld-spu/ovl2.d
index e4a47a6..bf62e03 100644
--- a/ld/testsuite/ld-spu/ovl2.d
+++ b/ld/testsuite/ld-spu/ovl2.d
@@ -1,5 +1,5 @@
#source: ovl2.s
-#ld: -N -T ovl.lnk --emit-relocs
+#ld: -N -T ovl2.lnk -T ovl.lnk --emit-relocs
#objdump: -D -r
.*elf32-spu
diff --git a/ld/testsuite/ld-spu/ovl2.lnk b/ld/testsuite/ld-spu/ovl2.lnk
new file mode 100644
index 0000000..9916ab2
--- /dev/null
+++ b/ld/testsuite/ld-spu/ovl2.lnk
@@ -0,0 +1,10 @@
+SECTIONS
+{
+ OVERLAY 0x400 :
+ {
+ .ov_a1 { *(.ov_a1) }
+ .ov_a2 { *(.ov_a2) }
+ .empty { empty.o?(.text) }
+ }
+}
+INSERT BEFORE .data;