aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2008-07-21 08:38:35 +0000
committerNick Clifton <nickc@redhat.com>2008-07-21 08:38:35 +0000
commit5b9f75a8ae5c7e27f23b95b6bbe86790e03a4d29 (patch)
tree444fc0a8a596d7636af2efd5f47fde0288aa462c /ld
parent * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Drop (diff)
downloadbinutils-gdb-5b9f75a8ae5c7e27f23b95b6bbe86790e03a4d29.tar.gz
binutils-gdb-5b9f75a8ae5c7e27f23b95b6bbe86790e03a4d29.tar.bz2
binutils-gdb-5b9f75a8ae5c7e27f23b95b6bbe86790e03a4d29.zip
* ld-scripts/include-sections.t: Discard all sections not
explicitly requested by the rest of the linker script. * ld-scripts/include-1.d: Expect test to fail for AIX ports. Do not assume that the .text section will be marked readonly. * ld-scripts/include.s: Replace .section directives with just .text or .data.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog9
-rw-r--r--ld/testsuite/ld-scripts/include-1.d4
-rw-r--r--ld/testsuite/ld-scripts/include-sections.t1
-rw-r--r--ld/testsuite/ld-scripts/include.s4
4 files changed, 15 insertions, 3 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index f613aec47ee..2538dc49415 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,12 @@
+2008-07-21 Nick Clifton <nickc@redhat.com>
+
+ * ld-scripts/include-sections.t: Discard all sections not
+ explicitly requested by the rest of the linker script.
+ * ld-scripts/include-1.d: Expect test to fail for AIX ports.
+ Do not assume that the .text section will be marked readonly.
+ * ld-scripts/include.s: Replace .section directives with just
+ .text or .data.
+
2008-07-18 Joseph Myers <joseph@codesourcery.com>
* ld-arm/attr-merge-wchar-0.s,ld-arm/attr-merge-wchar-2.s,
diff --git a/ld/testsuite/ld-scripts/include-1.d b/ld/testsuite/ld-scripts/include-1.d
index fc7617be5d2..65cef4d559f 100644
--- a/ld/testsuite/ld-scripts/include-1.d
+++ b/ld/testsuite/ld-scripts/include-1.d
@@ -2,10 +2,12 @@
# source: include.s
# ld: -T include-1.t
# objdump: -w -h
+# xfail: "*-aix*"
+# AIX targets rename the .text and .data sectons...
.*: file format .*
Sections:
Idx +Name +Size +VMA +LMA +File off +Algn +Flags
- 0 .text 0+000000c 0+0000000 0+0000000 [0-9a-f]+ 2\*\*[0-9]+ CONTENTS, ALLOC, LOAD, READONLY, CODE
+ 0 .text 0+000000c 0+0000000 0+0000000 [0-9a-f]+ 2\*\*[0-9]+ CONTENTS, ALLOC, LOAD,.*CODE
1 .data 0+000000c 0+0100000 0+0100000 [0-9a-f]+ 2\*\*[0-9]+ CONTENTS, ALLOC, LOAD, DATA
diff --git a/ld/testsuite/ld-scripts/include-sections.t b/ld/testsuite/ld-scripts/include-sections.t
index d5e500b01af..5d6ca1e1ba4 100644
--- a/ld/testsuite/ld-scripts/include-sections.t
+++ b/ld/testsuite/ld-scripts/include-sections.t
@@ -1,4 +1,5 @@
SECTIONS {
.text : { *(.text) } >rom
INCLUDE include-data.t
+ /DISCARD/ : { *(*) }
}
diff --git a/ld/testsuite/ld-scripts/include.s b/ld/testsuite/ld-scripts/include.s
index bf12fbe82ec..5b8fda69383 100644
--- a/ld/testsuite/ld-scripts/include.s
+++ b/ld/testsuite/ld-scripts/include.s
@@ -1,9 +1,9 @@
- .section .text, "ax", "progbits"
+ .text
.4byte 0x11223344
.4byte 0x55667788
.4byte 0x99aabbcc
- .section .data, "aw", "progbits"
+ .data
.4byte 0x01020304
.4byte 0x05060708
.4byte 0x090a0b0c