diff options
author | Nick Clifton <nickc@redhat.com> | 2020-04-30 13:49:30 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2020-04-30 13:49:30 +0100 |
commit | 8a8a1171237d45e20b2ebb18ee2d3f8686e01b82 (patch) | |
tree | 5369d51cd7cda1444cb313684cfa573e243b615a /binutils/testsuite | |
parent | 627c7fb8ea16388f349b6b26e20bf017d71e51fe (diff) | |
download | gdb-8a8a1171237d45e20b2ebb18ee2d3f8686e01b82.zip gdb-8a8a1171237d45e20b2ebb18ee2d3f8686e01b82.tar.gz gdb-8a8a1171237d45e20b2ebb18ee2d3f8686e01b82.tar.bz2 |
Add generic tests for linker support of the -shared or -pie options to tests which use them.
binutils* testsuite/lib/binutils-common.exp (check_pie_support): New
proc.
ld * testsuite/ld-elf/compress1c.d: XFAIL if thet target linker does
not support the -shared command line option.
* /ld-elf/compressed1c.d: Likewise.
* /ld-elf/compressed1e.d: Likewise.
* /ld-elf/dynamic1.d: Likewise.
* /ld-elf/dynsym1.d: Likewise.
* /ld-elf/ehdr_start-shared.d: Likewise.
* /ld-elf/exclude3b.d: Likewise.
* /ld-elf/global1.d: Likewise.
* /ld-elf/hash.d: Likewise.
* /ld-elf/local1.d: Likewise.
* /ld-elf/mbind1b.d: Likewise.
* /ld-elf/now-1.d: Likewise.
* /ld-elf/now-2.d: Likewise.
* /ld-elf/now-3.d: Likewise.
* /ld-elf/now-4.d: Likewise.
* /ld-elf/pr12975.d: Likewise.
* /ld-elf/pr13177.d: Likewise.
* /ld-elf/pr13195.d: Likewise.
* /ld-elf/pr16322.d: Likewise.
* /ld-elf/pr16498a.d: Likewise.
* /ld-elf/pr16498b.d: Likewise.
* /ld-elf/pr17615.d: Likewise.
* /ld-elf/pr19162.d: Likewise.
* /ld-elf/pr19698.d: Likewise.
* /ld-elf/pr20513c.d: Likewise.
* /ld-elf/pr20513d.d: Likewise.
* /ld-elf/pr21389a.d: Likewise.
* /ld-elf/pr21389b.d: Likewise.
* /ld-elf/pr21389c.d: Likewise.
* /ld-elf/pr21562a.d: Likewise.
* /ld-elf/pr21562b.d: Likewise.
* /ld-elf/pr21562c.d: Likewise.
* /ld-elf/pr21562d.d: Likewise.
* /ld-elf/pr21562e.d: Likewise.
* /ld-elf/pr21562f.d: Likewise.
* /ld-elf/pr21562g.d: Likewise.
* /ld-elf/pr21562h.d: Likewise.
* /ld-elf/pr21562i.d: Likewise.
* /ld-elf/pr21562j.d: Likewise.
* /ld-elf/pr21562k.d: Likewise.
* /ld-elf/pr21562l.d: Likewise.
* /ld-elf/pr21562m.d: Likewise.
* /ld-elf/pr21562n.d: Likewise.
* /ld-elf/pr21903a.d: Likewise.
* /ld-elf/pr21903b.d: Likewise.
* /ld-elf/pr22269b.d: Likewise.
* /ld-elf/pr22393-1a.d: Likewise.
* /ld-elf/pr22393-1b.d: Likewise.
* /ld-elf/pr23658-1c.d: Likewise.
* /ld-elf/pr25708.d: Likewise.
* /ld-elf/rpath-1.d: Likewise.
* /ld-elf/rpath-2.d: Likewise.
* /ld-elf/runpath-1.d: Likewise.
* /ld-elf/runpath-2.d: Likewise.
* /ld-elf/sizeofb.d: Likewise.
* /ld-elf/startofb.d: Likewise.
* /ld-elf/strtab.d: Likewise.
* /ld-elf/textaddr2.d: Likewise.
* /ld-elf/textaddr5.d: Likewise.
* /ld-elf/textaddr6.d: Likewise.
* /ld-elf/unknown2.d: Likewise.
* /ld-undefined/entry-3.d: Likewise.
* /ld-undefined/entry-4.d: Likewise.
* /ld-elf/mbind1c.d: XFAIL if the target linker does not support
the -pie option.
* /ld-elf/pie.d: Likewise.
* /ld-elf/pr19539.d: Likewise.
* /ld-elf/pr21903d.d: Likewise.
* /ld-elf/pr22269a.d: Likewise.
* /ld-elf/pr22393-1c.d: Likewise.
* /ld-elf/pr22393-1d.d: Likewise.
* /ld-elf/pr22423.d: Likewise.
* /ld-elf/loadaddr1.d: Expect to fail on the rx-linux target.
* /ld-elf/loadaddr2.d: Likewise.
* /ld-elf/pr22393-1e.d: Likewise.
* /ld-elf/pr22393-1f.d: Likewise.
* /ld-elf/textaddr1.d: Likewise.
* /ld-elf/textaddr4.d: Likewise.
Diffstat (limited to 'binutils/testsuite')
-rw-r--r-- | binutils/testsuite/lib/binutils-common.exp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/binutils/testsuite/lib/binutils-common.exp b/binutils/testsuite/lib/binutils-common.exp index 08dcc4d..b9e3c6d 100644 --- a/binutils/testsuite/lib/binutils-common.exp +++ b/binutils/testsuite/lib/binutils-common.exp @@ -291,6 +291,23 @@ proc check_shared_lib_support { } { return $shared_available_saved } +# Returns true if -pie is supported on the target + +proc check_pie_support { } { + global pie_available_saved + global ld + + if {![info exists pie_available_saved]} { + set ld_output [remote_exec host $ld "-pie"] + if { [ string first "not supported" $ld_output ] >= 0 } { + set pie_available_saved 0 + } else { + set pie_available_saved 1 + } + } + return $pie_available_saved +} + # 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. # |