diff options
Diffstat (limited to 'binutils/testsuite/binutils-all')
-rw-r--r-- | binutils/testsuite/binutils-all/common-1.s | 1 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/common-1a.d | 8 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/common-1b.d | 8 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/common-1c.d | 9 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/common-1d.d | 9 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/common-1e.d | 9 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/common-1f.d | 9 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/common-2.s | 1 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/common-2a.d | 8 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/common-2b.d | 8 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/common-2c.d | 9 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/common-2d.d | 9 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/common-2e.d | 9 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/common-2f.d | 9 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/objcopy.exp | 18 |
15 files changed, 124 insertions, 0 deletions
diff --git a/binutils/testsuite/binutils-all/common-1.s b/binutils/testsuite/binutils-all/common-1.s new file mode 100644 index 00000000000..f684da48c4f --- /dev/null +++ b/binutils/testsuite/binutils-all/common-1.s @@ -0,0 +1 @@ + .comm foobar,30,4 diff --git a/binutils/testsuite/binutils-all/common-1a.d b/binutils/testsuite/binutils-all/common-1a.d new file mode 100644 index 00000000000..f8c6fea6f6b --- /dev/null +++ b/binutils/testsuite/binutils-all/common-1a.d @@ -0,0 +1,8 @@ +#source: common-1.s +#as: --elf-stt-common=yes +#PROG: objcopy +#readelf: -s -W + +#... + +[0-9]+: +0+4 +30 +COMMON +GLOBAL +DEFAULT +COM +foobar +#pass diff --git a/binutils/testsuite/binutils-all/common-1b.d b/binutils/testsuite/binutils-all/common-1b.d new file mode 100644 index 00000000000..5a56c6e652f --- /dev/null +++ b/binutils/testsuite/binutils-all/common-1b.d @@ -0,0 +1,8 @@ +#source: common-1.s +#as: --elf-stt-common=no +#PROG: objcopy +#readelf: -s -W + +#... + +[0-9]+: +0+4 +30 +OBJECT +GLOBAL +DEFAULT +COM +foobar +#pass diff --git a/binutils/testsuite/binutils-all/common-1c.d b/binutils/testsuite/binutils-all/common-1c.d new file mode 100644 index 00000000000..bbdc49e1d8a --- /dev/null +++ b/binutils/testsuite/binutils-all/common-1c.d @@ -0,0 +1,9 @@ +#source: common-1.s +#as: --elf-stt-common=yes +#PROG: objcopy +#objcopy: --elf-stt-common=no +#readelf: -s -W + +#... + +[0-9]+: +0+4 +30 +OBJECT +GLOBAL +DEFAULT +COM +foobar +#pass diff --git a/binutils/testsuite/binutils-all/common-1d.d b/binutils/testsuite/binutils-all/common-1d.d new file mode 100644 index 00000000000..c0df02931d1 --- /dev/null +++ b/binutils/testsuite/binutils-all/common-1d.d @@ -0,0 +1,9 @@ +#source: common-1.s +#as: --elf-stt-common=yes +#PROG: objcopy +#objcopy: --elf-stt-common=yes +#readelf: -s -W + +#... + +[0-9]+: +0+4 +30 +COMMON +GLOBAL +DEFAULT +COM +foobar +#pass diff --git a/binutils/testsuite/binutils-all/common-1e.d b/binutils/testsuite/binutils-all/common-1e.d new file mode 100644 index 00000000000..9f84955efe2 --- /dev/null +++ b/binutils/testsuite/binutils-all/common-1e.d @@ -0,0 +1,9 @@ +#source: common-1.s +#as: --elf-stt-common=no +#PROG: objcopy +#objcopy: --elf-stt-common=yes +#readelf: -s -W + +#... + +[0-9]+: +0+4 +30 +COMMON +GLOBAL +DEFAULT +COM +foobar +#pass diff --git a/binutils/testsuite/binutils-all/common-1f.d b/binutils/testsuite/binutils-all/common-1f.d new file mode 100644 index 00000000000..bdbdca5ef9f --- /dev/null +++ b/binutils/testsuite/binutils-all/common-1f.d @@ -0,0 +1,9 @@ +#source: common-1.s +#as: --elf-stt-common=no +#PROG: objcopy +#objcopy: --elf-stt-common=no +#readelf: -s -W + +#... + +[0-9]+: +0+4 +30 +OBJECT +GLOBAL +DEFAULT +COM +foobar +#pass diff --git a/binutils/testsuite/binutils-all/common-2.s b/binutils/testsuite/binutils-all/common-2.s new file mode 100644 index 00000000000..bf2c26cbc68 --- /dev/null +++ b/binutils/testsuite/binutils-all/common-2.s @@ -0,0 +1 @@ + .tls_common foobar,30,4 diff --git a/binutils/testsuite/binutils-all/common-2a.d b/binutils/testsuite/binutils-all/common-2a.d new file mode 100644 index 00000000000..75e62171c47 --- /dev/null +++ b/binutils/testsuite/binutils-all/common-2a.d @@ -0,0 +1,8 @@ +#source: common-2.s +#as: --elf-stt-common=yes +#PROG: objcopy +#readelf: -s -W + +#... + +[0-9]+: +0+4 +30 +TLS +GLOBAL +DEFAULT +COM +foobar +#pass diff --git a/binutils/testsuite/binutils-all/common-2b.d b/binutils/testsuite/binutils-all/common-2b.d new file mode 100644 index 00000000000..7c7a1941dc5 --- /dev/null +++ b/binutils/testsuite/binutils-all/common-2b.d @@ -0,0 +1,8 @@ +#source: common-2.s +#as: --elf-stt-common=no +#PROG: objcopy +#readelf: -s -W + +#... + +[0-9]+: +0+4 +30 +TLS +GLOBAL +DEFAULT +COM +foobar +#pass diff --git a/binutils/testsuite/binutils-all/common-2c.d b/binutils/testsuite/binutils-all/common-2c.d new file mode 100644 index 00000000000..c203dd2fbe9 --- /dev/null +++ b/binutils/testsuite/binutils-all/common-2c.d @@ -0,0 +1,9 @@ +#source: common-2.s +#as: --elf-stt-common=yes +#PROG: objcopy +#objcopy: --elf-stt-common=yes +#readelf: -s -W + +#... + +[0-9]+: +0+4 +30 +TLS +GLOBAL +DEFAULT +COM +foobar +#pass diff --git a/binutils/testsuite/binutils-all/common-2d.d b/binutils/testsuite/binutils-all/common-2d.d new file mode 100644 index 00000000000..da221d6c9f2 --- /dev/null +++ b/binutils/testsuite/binutils-all/common-2d.d @@ -0,0 +1,9 @@ +#source: common-2.s +#as: --elf-stt-common=yes +#PROG: objcopy +#objcopy: --elf-stt-common=no +#readelf: -s -W + +#... + +[0-9]+: +0+4 +30 +TLS +GLOBAL +DEFAULT +COM +foobar +#pass diff --git a/binutils/testsuite/binutils-all/common-2e.d b/binutils/testsuite/binutils-all/common-2e.d new file mode 100644 index 00000000000..04b1fafcfd0 --- /dev/null +++ b/binutils/testsuite/binutils-all/common-2e.d @@ -0,0 +1,9 @@ +#source: common-2.s +#as: --elf-stt-common=no +#PROG: objcopy +#objcopy: --elf-stt-common=yes +#readelf: -s -W + +#... + +[0-9]+: +0+4 +30 +TLS +GLOBAL +DEFAULT +COM +foobar +#pass diff --git a/binutils/testsuite/binutils-all/common-2f.d b/binutils/testsuite/binutils-all/common-2f.d new file mode 100644 index 00000000000..4748e5d68c5 --- /dev/null +++ b/binutils/testsuite/binutils-all/common-2f.d @@ -0,0 +1,9 @@ +#source: common-2.s +#as: --elf-stt-common=no +#PROG: objcopy +#objcopy: --elf-stt-common=no +#readelf: -s -W + +#... + +[0-9]+: +0+4 +30 +TLS +GLOBAL +DEFAULT +COM +foobar +#pass diff --git a/binutils/testsuite/binutils-all/objcopy.exp b/binutils/testsuite/binutils-all/objcopy.exp index b2c54ea3a6c..c348578cd54 100644 --- a/binutils/testsuite/binutils-all/objcopy.exp +++ b/binutils/testsuite/binutils-all/objcopy.exp @@ -1005,6 +1005,23 @@ proc objcopy_test_symbol_manipulation {} { } } +proc objcopy_test_elf_common_symbols {} { + global srcdir + global subdir + + # hpux has a non-standard common directive. + if { [istarget "*-*-hpux*"] } then { + return + } + + set test_list [lsort [glob -nocomplain $srcdir/$subdir/common-*.d]] + foreach t $test_list { + # We need to strip the ".d", but can leave the dirname. + verbose [file rootname $t] + run_dump_test [file rootname $t] + } +} + # ia64 specific tests if { ([istarget "ia64-*-elf*"] || [istarget "ia64-*-linux*"]) } { @@ -1014,6 +1031,7 @@ if { ([istarget "ia64-*-elf*"] # ELF specific tests if [is_elf_format] { objcopy_test_symbol_manipulation + objcopy_test_elf_common_symbols objcopy_test "ELF unknown section type" unknown.s objcopy_test_readelf "ELF group" group.s objcopy_test_readelf "ELF group" group-2.s |