diff options
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 7 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/objcopy.exp | 7 | ||||
-rw-r--r-- | binutils/testsuite/lib/binutils-common.exp | 40 |
3 files changed, 49 insertions, 5 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 57802e8..faa9b78 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,10 @@ +2016-05-17 Maciej W. Rozycki <macro@imgtec.com> + + * testsuite/lib/binutils-common.exp (supports_gnu_unique): New + procedure. + * testsuite/binutils-all/objcopy.exp: Use `supports_gnu_unique' + with the `strip-10' test. + 2016-05-16 Maciej W. Rozycki <macro@imgtec.com> * testsuite/binutils-all/objcopy.exp: Don't skip the `strip-10' diff --git a/binutils/testsuite/binutils-all/objcopy.exp b/binutils/testsuite/binutils-all/objcopy.exp index 176764a..af333ac 100644 --- a/binutils/testsuite/binutils-all/objcopy.exp +++ b/binutils/testsuite/binutils-all/objcopy.exp @@ -1060,11 +1060,8 @@ if [is_elf_format] { run_dump_test "strip-8" run_dump_test "strip-9" run_dump_test "strip-12" - # Non-EABI ARM targets will set OSABI to ARM - if { ![istarget "*-*-hpux*"] - && ![istarget "msp*-*-*"] - && ![istarget "visium-*-*"] - && !([istarget "arm*-*-*"] && ![istarget "arm-*-*eabi*"])} { + # This requires STB_GNU_UNIQUE support with OSABI set to GNU. + if { [supports_gnu_unique] } { run_dump_test "strip-10" } set extra_strip11 "" diff --git a/binutils/testsuite/lib/binutils-common.exp b/binutils/testsuite/lib/binutils-common.exp index 5f17012..33a0382 100644 --- a/binutils/testsuite/lib/binutils-common.exp +++ b/binutils/testsuite/lib/binutils-common.exp @@ -162,6 +162,46 @@ proc is_elf64 { binary_file } { return 0 } +# True if the ELF target supports STB_GNU_UNIQUE with the ELF header's +# OSABI field set to ELFOSABI_GNU. +# +# This generally depends on the target OS only, however there are a +# number of exceptions for bare metal targets as follows. The MSP430 +# and Visium targets set OSABI to ELFOSABI_STANDALONE and cannot +# support STB_GNU_UNIQUE. Likewise non-EABI ARM targets set OSABI to +# ELFOSABI_ARM, and TI C6X targets to ELFOSABI_C6000_*. Finally +# rather than `bfd_elf_final_link' AM33/2.0, D30V, DLX, i960, and +# picoJava targets use `_bfd_generic_final_link', which does not +# support STB_GNU_UNIQUE symbol binding causing assertion failures. +# +proc supports_gnu_unique {} { + if { [istarget *-*-gnu*] + || [istarget *-*-linux*] + || [istarget *-*-nacl*] } { + return 1 + } + if { [istarget "arm*-*-*eabi*"] } { + return 1 + } + if { ![istarget "*-*-elf*"] } { + return 0 + } + if { [istarget "arm*-*-*"] + || [istarget "msp430-*-*"] + || [istarget "tic6x-*-*"] + || [istarget "visium-*-*"] } { + return 0 + } + if { [istarget "am33_2.0-*-*"] + || [istarget "d30v-*-*"] + || [istarget "dlx-*-*"] + || [istarget "i960-*-*"] + || [istarget "pj*-*-*"] } { + return 0 + } + return 1 +} + # Compare two files line-by-line. FILE_1 is the actual output and FILE_2 # is the expected output. Ignore blank lines in either file. # |