diff options
author | Alan Modra <amodra@gmail.com> | 2011-05-20 15:33:29 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2011-05-20 15:33:29 +0000 |
commit | 67e9eb74af1c9e7fd75cf7820fd3282757bef119 (patch) | |
tree | 190fb34b1c29c62574aef3291c44338b8ed4c18d /ld/testsuite/ld-elf | |
parent | 86b2281fde235816619a26af3c59ce24b949b2f8 (diff) | |
download | gdb-67e9eb74af1c9e7fd75cf7820fd3282757bef119.zip gdb-67e9eb74af1c9e7fd75cf7820fd3282757bef119.tar.gz gdb-67e9eb74af1c9e7fd75cf7820fd3282757bef119.tar.bz2 |
PR 12763
* ld-elf/tdata3.s: New test.
* ld-elf/tbss3.s: New test.
* ld-elf/binutils.exp: Consolidate tbss and tdata tests.
Diffstat (limited to 'ld/testsuite/ld-elf')
-rw-r--r-- | ld/testsuite/ld-elf/binutils.exp | 41 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/tbss3.s | 17 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/tdata3.s | 23 |
3 files changed, 54 insertions, 27 deletions
diff --git a/ld/testsuite/ld-elf/binutils.exp b/ld/testsuite/ld-elf/binutils.exp index 6f881f3..47636d2 100644 --- a/ld/testsuite/ld-elf/binutils.exp +++ b/ld/testsuite/ld-elf/binutils.exp @@ -121,35 +121,22 @@ if { ([istarget "i?86-*-elf*"] binutils_test strip "-T ${srcdir}/${subdir}/lma.lnk" lma +set tls_tests { "tdata1" "tdata2" "tdata3" } # hppa64 has its own .tbss section, with different flags. if { ![istarget "hppa64-*-*"] } { - binutils_test objcopy "" tbss1 - binutils_test objcopy "-z relro" tbss1 - binutils_test objcopy "-shared" tbss1 - binutils_test objcopy "-shared -z relro" tbss1 - binutils_test objcopy "-z max-page-size=0x100000" tbss1 - binutils_test objcopy "-z max-page-size=0x100000 -z common-page-size=0x1000" tbss1 + lappend tls_tests "tbss1" "tbss2" "tbss3" } - -binutils_test objcopy "" tdata1 -binutils_test objcopy "-z relro" tdata1 -binutils_test objcopy "-shared" tdata1 -binutils_test objcopy "-shared -z relro" tdata1 -binutils_test objcopy "-z max-page-size=0x100000" tdata1 -binutils_test objcopy "-z max-page-size=0x100000 -z common-page-size=0x1000" tdata1 - -if { ![istarget "hppa64-*-*"] } { - binutils_test objcopy "" tbss2 - binutils_test objcopy "-z relro" tbss2 - binutils_test objcopy "-shared" tbss2 - binutils_test objcopy "-shared -z relro" tbss2 - binutils_test objcopy "-z max-page-size=0x100000" tbss2 - binutils_test objcopy "-z max-page-size=0x100000 -z common-page-size=0x1000" tbss2 +set tls_opts { + "" + "-z relro" + "-shared" + "-shared -z relro" + "-z max-page-size=0x100000" + "-z max-page-size=0x100000 -z common-page-size=0x1000" } -binutils_test objcopy "" tdata2 -binutils_test objcopy "-z relro" tdata2 -binutils_test objcopy "-shared" tdata2 -binutils_test objcopy "-shared -z relro" tdata2 -binutils_test objcopy "-z max-page-size=0x100000" tdata2 -binutils_test objcopy "-z max-page-size=0x100000 -z common-page-size=0x1000" tdata2 +foreach testitem $tls_tests { + foreach testopt $tls_opts { + binutils_test objcopy $testopt $testitem + } +} diff --git a/ld/testsuite/ld-elf/tbss3.s b/ld/testsuite/ld-elf/tbss3.s new file mode 100644 index 0000000..f5530a3 --- /dev/null +++ b/ld/testsuite/ld-elf/tbss3.s @@ -0,0 +1,17 @@ + .globl main + .globl start + .globl _start + .globl __start + .text +main: +start: +_start: +__start: + .byte 0 + + .section .tbss,"awT",%nobits + .p2align 10 + .type tbss, %object + .size tbss, 1024 +tbss: + .zero 1024 diff --git a/ld/testsuite/ld-elf/tdata3.s b/ld/testsuite/ld-elf/tdata3.s new file mode 100644 index 0000000..8886360 --- /dev/null +++ b/ld/testsuite/ld-elf/tdata3.s @@ -0,0 +1,23 @@ + .globl main + .globl start + .globl _start + .globl __start + .text +main: +start: +_start: +__start: + .byte 0 + + .section .tdata,"awT",%progbits + .type tdata,%object + .size tdata,1 +tdata: + .byte 17 + + .section .tbss,"awT",%nobits + .p2align 10 + .type tbss, %object + .size tbss, 1024 +tbss: + .zero 1024 |