aboutsummaryrefslogtreecommitdiff
path: root/binutils/testsuite/binutils-all
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2006-04-26 13:37:05 +0000
committerH.J. Lu <hjl.tools@gmail.com>2006-04-26 13:37:05 +0000
commitaf3c5dea223a0b9406b59dae3dcfb446b4e10e6b (patch)
tree5f44554bf57dab497ae59d41c7f6a7a6ca0a0562 /binutils/testsuite/binutils-all
parente843e0f8801fd13962c7cff7317b9a89292544e3 (diff)
downloadgdb-af3c5dea223a0b9406b59dae3dcfb446b4e10e6b.zip
gdb-af3c5dea223a0b9406b59dae3dcfb446b4e10e6b.tar.gz
gdb-af3c5dea223a0b9406b59dae3dcfb446b4e10e6b.tar.bz2
2006-04-26 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/2593 * binutils-all/copy-1.d: New file. * binutils-all/copy-1.s: Likewise. * binutils-all/copy-2.d: Likewise. * binutils-all/objcopy.exp: Add run_dump_test "copy-1" and run_dump_test "copy-2". * lib/utils-lib.exp (run_dump_test): New. (slurp_options): Likewise. (regexp_diff): Likewise. (file_contents): Likewise. (verbose_eval): Likewise.
Diffstat (limited to 'binutils/testsuite/binutils-all')
-rw-r--r--binutils/testsuite/binutils-all/copy-1.d13
-rw-r--r--binutils/testsuite/binutils-all/copy-1.s6
-rw-r--r--binutils/testsuite/binutils-all/copy-2.d14
-rw-r--r--binutils/testsuite/binutils-all/objcopy.exp3
4 files changed, 36 insertions, 0 deletions
diff --git a/binutils/testsuite/binutils-all/copy-1.d b/binutils/testsuite/binutils-all/copy-1.d
new file mode 100644
index 0000000..a33b28e
--- /dev/null
+++ b/binutils/testsuite/binutils-all/copy-1.d
@@ -0,0 +1,13 @@
+#PROG: objcopy
+#objdump: -h
+#objcopy: --set-section-flags .post_text_reserve=contents,alloc,load,readonly,code
+#name: copy with seting section flags 1
+
+.*: +file format .*
+
+Sections:
+Idx.*
+#...
+ [0-9]* .post_text_reserve.*
+ CONTENTS, ALLOC, LOAD, READONLY, CODE
+#...
diff --git a/binutils/testsuite/binutils-all/copy-1.s b/binutils/testsuite/binutils-all/copy-1.s
new file mode 100644
index 0000000..32864de
--- /dev/null
+++ b/binutils/testsuite/binutils-all/copy-1.s
@@ -0,0 +1,6 @@
+ .globl text_symbol
+ .text
+text_symbol:
+ .long 1
+ .section .post_text_reserve,"w", %nobits
+ .space 160
diff --git a/binutils/testsuite/binutils-all/copy-2.d b/binutils/testsuite/binutils-all/copy-2.d
new file mode 100644
index 0000000..486c8e9
--- /dev/null
+++ b/binutils/testsuite/binutils-all/copy-2.d
@@ -0,0 +1,14 @@
+#PROG: objcopy
+#objdump: -h
+#objcopy: --set-section-flags .text=alloc,data
+#name: copy with seting section flags 2
+#source: bintest.s
+
+.*: +file format .*
+
+Sections:
+Idx.*
+#...
+ [0-9]* .text.*
+ CONTENTS, ALLOC, LOAD, RELOC, DATA
+#...
diff --git a/binutils/testsuite/binutils-all/objcopy.exp b/binutils/testsuite/binutils-all/objcopy.exp
index d46b538..06728d1 100644
--- a/binutils/testsuite/binutils-all/objcopy.exp
+++ b/binutils/testsuite/binutils-all/objcopy.exp
@@ -724,3 +724,6 @@ if [is_elf_format] {
objcopy_test "ELF unknown section type" unknown.s
objcopy_test_readelf "ELF group" group.s
}
+
+run_dump_test "copy-1"
+run_dump_test "copy-2"