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.
This commit is contained in:
Nick Clifton 2020-04-30 13:49:30 +01:00
parent 627c7fb8ea
commit 8a8a117123
80 changed files with 181 additions and 77 deletions

View File

@ -1,3 +1,8 @@
2020-04-30 Nick Clifton <nickc@redhat.com>
* testsuite/lib/binutils-common.exp (check_pie_support): New
proc.
2020-04-29 Andrew Burgess <andrew.burgess@embecosm.com>
* dwarf.c (display_debug_ranges): Ignore duplicate entries in

View File

@ -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.
#

View File

@ -1,3 +1,85 @@
2020-04-30 Nick Clifton <nickc@redhat.com>
* 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.
2020-04-30 Yoshinori Sato <ysato@users.sourceforge.jp>
* emulparams/elf32rx_linux.sh: New rx-linux emulation.

View File

@ -3,7 +3,7 @@
#ld: -shared
#readelf: -S --wide
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
#failif
#...

View File

@ -3,7 +3,7 @@
#ld: -shared --compress-debug-sections=none
#readelf: -t
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
#failif
#...

View File

@ -3,7 +3,7 @@
#ld: -shared --compress-debug-sections=zlib-gnu
#readelf: -SW
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
#failif
#...

View File

@ -1,7 +1,7 @@
#ld: -shared -T dynamic1.ld
#readelf: -l --wide
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
#...
Section to Segment mapping:

View File

@ -2,7 +2,7 @@
#ld: -shared
#readelf: --dyn-syms
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
#...
+[0-9]+: +[0-9a-f]+ +[0-9]+ +FUNC +GLOBAL +DEFAULT +[1-9] _start

View File

@ -2,7 +2,7 @@
#ld: -e _start -shared
#nm: -n
#target: *-*-linux* *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi
#xfail: cris*-*-* frv-*-* h8300-*-*
#xfail: cris*-*-* frv-*-* ![check_shared_lib_support]
#...
[0-9a-f]*000 [Adrt] __ehdr_start

View File

@ -2,7 +2,7 @@
#ld: --shared
#readelf: -S --wide
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
#failif
#...

View File

@ -2,7 +2,7 @@
#ld: -shared -z global
#readelf: -d
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
#...
0x0*6ffffffb \(FLAGS_1\) *Flags: GLOBAL

View File

@ -2,7 +2,7 @@
#readelf: -d -s -D
#ld: -shared --hash-style=gnu
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
#xfail: mips*-*-*
# MIPS uses a different style of GNU hash due to psABI restrictions
# on dynsym table ordering.

View File

@ -2,7 +2,7 @@
#ld: -T loadaddr1.t -T loadaddr.t -z max-page-size=0x200000 -z noseparate-code
#readelf: -l --wide
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: h8300-*-* rx-*-linux*
#...
LOAD +0x000000 0xf*80000000 0xf*80000000 0x100050 0x100050 RWE 0x200000

View File

@ -2,7 +2,7 @@
#ld: -T loadaddr2.t -T loadaddr.t -z max-page-size=0x200000 -z noseparate-code
#readelf: -l --wide
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: h8300-*-* rx-*-linux*
#...
LOAD +0x000000 0xf*80000000 0xf*80000000 0x100050 0x100050 RWE 0x200000

View File

@ -1,7 +1,7 @@
#ld: -shared --version-script local1.map
#readelf: -s --wide
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
#...
.*: [0-9a-f]* +[0-9a-f]+ +OBJECT +LOCAL +DEFAULT +[0-9] +foo

View File

@ -2,7 +2,7 @@
#ld: -shared -z common-page-size=0x1000 -z max-page-size=0x200000
#readelf: -S -l --wide
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
#...
\[[ 0-9]+\] \.mbind\.text[ ]+PROGBITS[ ]+[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 00 AXD 0 0 4096

View File

@ -2,7 +2,7 @@
#ld: -pie -z common-page-size=0x1000 -z max-page-size=0x200000
#readelf: -S -l --wide
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_pie_support]
#...
\[[ 0-9]+\] \.mbind\.text[ ]+PROGBITS[ ]+[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 00 AXD 0 0 4096

View File

@ -2,7 +2,7 @@
#readelf: -d -W
#ld: -shared -z now --enable-new-dtags
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
#failif
#...

View File

@ -2,7 +2,7 @@
#readelf: -d -W
#ld: -shared -z now --enable-new-dtags
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
#...
0x[0-9a-f]+ +\(FLAGS\) +BIND_NOW

View File

@ -2,7 +2,7 @@
#readelf: -d -W
#ld: -shared -z now --disable-new-dtags
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
#failif
#...

View File

@ -2,7 +2,7 @@
#readelf: -d -W
#ld: -shared -z now --disable-new-dtags
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
#...
0x[0-9a-f]+ +\(BIND_NOW\) +

View File

@ -2,7 +2,7 @@
#readelf: -d -W
#ld: -pie
#target: *-*-linux* *-*-gnu* *-*-solaris* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_pie_support]
#...
+0x[0-9a-f]+ +\(FLAGS_1\) +Flags: +PIE

View File

@ -1,7 +1,7 @@
#ld: --gc-sections -shared -version-script pr12975.t
#readelf: -s --wide
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: [is_generic] h8300-*-* hppa64-*-* mep-*-* mn10200-*-*
#xfail: [is_generic] hppa64-*-* mep-*-* mn10200-*-* ![check_shared_lib_support]
# generic linker targets don't support --gc-sections, nor do a bunch of others
#failif

View File

@ -2,7 +2,7 @@
#ld: --gc-sections -shared
#readelf: -s -D --wide
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: [is_generic] h8300-*-* hppa64-*-* mep-*-* mn10200-*-*
#xfail: [is_generic] hppa64-*-* mep-*-* mn10200-*-* ![check_shared_lib_support]
# generic linker targets don't support --gc-sections, nor do a bunch of others
#failif

View File

@ -1,7 +1,7 @@
#ld: --gc-sections -shared -version-script pr13195.t
#readelf: -s --wide -D
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: [is_generic] h8300-*-* hppa64-*-* mep-*-* mn10200-*-*
#xfail: [is_generic] hppa64-*-* mep-*-* mn10200-*-* ![check_shared_lib_support]
# generic linker targets don't support --gc-sections, nor do a bunch of others
#...

View File

@ -1,7 +1,7 @@
#ld: -shared -z relro -z noseparate-code
#readelf: -l --wide
#target: *-*-linux-gnu *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
#...
GNU_RELRO .*

View File

@ -1,7 +1,7 @@
#ld: -shared -T pr16498a.t
#readelf: -l --wide
#target: *-*-linux* *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
#...
TLS .*

View File

@ -2,7 +2,7 @@
#ld: -shared -T pr16498b.t
#readelf: -l --wide
#target: *-*-linux* *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
#...
TLS .*

View File

@ -1,7 +1,7 @@
#ld: --gc-sections -shared
#readelf: -S --wide --dyn-syms
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: [is_generic] h8300-*-* hppa64-*-* mep-*-* mn10200-*-*
#xfail: [is_generic] hppa64-*-* mep-*-* mn10200-*-* ![check_shared_lib_support]
# generic linker targets don't support --gc-sections, nor do a bunch of others
#...

View File

@ -3,7 +3,7 @@
#ld: -shared -z max-page-size=0x200000 -z noseparate-code
#readelf: -l --wide
#target: *-*-linux* *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-* hppa*-*-*
#xfail: hppa*-*-* ![check_shared_lib_support]
# hppa fails due to PR 12376.
#...

View File

@ -3,7 +3,7 @@
#ld: -pie -T pr19539.t
#readelf : --dyn-syms --wide
#target: *-*-linux* *-*-gnu* *-*-solaris* arm*-*-uclinuxfdpiceabi
#xfail: cris*-*-* h8300-*-*
#xfail: cris*-*-* ![check_pie_support]
Symbol table '\.dynsym' contains [0-9]+ entr(y|ies):
#pass

View File

@ -1,7 +1,7 @@
#ld: -shared $srcdir/$subdir/pr19698.t
#readelf : --dyn-syms --wide
#target: *-*-linux* *-*-gnu* *-*-solaris* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
Symbol table '\.dynsym' contains [0-9]+ entries:
#...

View File

@ -3,7 +3,7 @@
#ld: -shared
#readelf: -S --wide
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
#failif
#...

View File

@ -3,7 +3,7 @@
#ld: -shared
#readelf: -S --wide
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
#failif
#...

View File

@ -2,7 +2,7 @@
#ld: -shared --version-script pr21389.map -soname=pr21389.so
#objdump: -p
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
#...
Version definitions:

View File

@ -2,7 +2,7 @@
#ld: -shared --version-script pr21389.map -soname=pr21389.so
#readelf: -d
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
#...
0x[0-9a-f]* \(SONAME\) +Library soname: \[pr21389.so\]

View File

@ -2,7 +2,7 @@
#ld: -shared -soname=pr21389.so
#readelf: -d
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
#...
0x[0-9a-f]* \(SONAME\) +Library soname: \[pr21389.so\]

View File

@ -1,7 +1,7 @@
#ld: -shared -z defs --gc-sections
#readelf: -s -S --wide
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: [is_generic] h8300-*-* hppa64-*-* mep-*-* mn10200-*-*
#xfail: [is_generic] hppa64-*-* mep-*-* mn10200-*-* ![check_shared_lib_support]
# generic linker targets don't support --gc-sections, nor do a bunch of others
#...

View File

@ -1,7 +1,7 @@
#ld: -shared -z defs --gc-sections
#readelf: -s -S --wide
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: [is_generic] h8300-*-* hppa64-*-* mep-*-* mn10200-*-*
#xfail: [is_generic] h8300-*-* hppa64-*-* mep-*-* mn10200-*-* ![check_shared_lib_support]
# generic linker targets don't support --gc-sections, nor do a bunch of others
#...

View File

@ -2,7 +2,7 @@
#ld: -shared -z defs --gc-sections -T pr21562a.t
#readelf: -s -S --wide
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: [is_generic] h8300-*-* hppa64-*-* mep-*-* mn10200-*-*
#xfail: [is_generic] h8300-*-* hppa64-*-* mep-*-* mn10200-*-* ![check_shared_lib_support]
# generic linker targets don't support --gc-sections, nor do a bunch of others
#...

View File

@ -2,7 +2,7 @@
#ld: -shared -z defs --gc-sections -T pr21562a.t
#readelf: -s -S --wide
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: [is_generic] h8300-*-* hppa64-*-* mep-*-* mn10200-*-*
#xfail: [is_generic] h8300-*-* hppa64-*-* mep-*-* mn10200-*-* ![check_shared_lib_support]
# generic linker targets don't support --gc-sections, nor do a bunch of others
#...

View File

@ -2,7 +2,7 @@
#ld: -shared -z defs
#readelf: -s -S --wide
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: h8300-*-* ![check_shared_lib_support]
#...
\[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.*

View File

@ -2,7 +2,7 @@
#ld: -shared -z defs
#readelf: -s -S --wide
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: h8300-*-* ![check_shared_lib_support]
#...
\[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.*

View File

@ -2,7 +2,7 @@
#ld: -shared -z defs -T pr21562a.t
#readelf: -s -S --wide
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: h8300-*-* ![check_shared_lib_support]
#...
\[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.*

View File

@ -2,7 +2,7 @@
#ld: -shared -z defs -T pr21562a.t
#readelf: -s -S --wide
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: h8300-*-* ![check_shared_lib_support]
#...
\[[ 0-9]+\] scnfoo[ \t]+PROGBITS[ \t]+[0-9a-f]+ +[0-9a-f]+ +0*10[ \t]+.*

View File

@ -2,7 +2,7 @@
#ld: -shared -z defs --gc-sections -T pr21562b.t
#readelf: -s -S --wide
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: [is_generic] h8300-*-* hppa64-*-* mep-*-* mn10200-*-*
#xfail: [is_generic] h8300-*-* hppa64-*-* mep-*-* mn10200-*-* ![check_shared_lib_support]
# generic linker targets don't support --gc-sections, nor do a bunch of others
#...

View File

@ -2,7 +2,7 @@
#ld: -shared -z defs --gc-sections -T pr21562b.t
#readelf: -s -S --wide
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: [is_generic] h8300-*-* hppa64-*-* mep-*-* mn10200-*-*
#xfail: [is_generic] ![check_shared_lib_support] h8300-*-* hppa64-*-* mep-*-* mn10200-*-*
# generic linker targets don't support --gc-sections, nor do a bunch of others
#...

View File

@ -2,7 +2,7 @@
#ld: -shared -z defs --gc-sections -T pr21562c.t
#readelf: -s -S --wide
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: [is_generic] h8300-*-* hppa64-*-* mep-*-* mn10200-*-*
#xfail: [is_generic] hppa64-*-* mep-*-* mn10200-*-* ![check_shared_lib_support]
# generic linker targets don't support --gc-sections, nor do a bunch of others
#...

View File

@ -2,7 +2,7 @@
#ld: -shared -z defs --gc-sections -T pr21562c.t
#readelf: -s -S --wide
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: [is_generic] h8300-*-* hppa64-*-* mep-*-* mn10200-*-*
#xfail: [is_generic] hppa64-*-* mep-*-* mn10200-*-* ![check_shared_lib_support]
# generic linker targets don't support --gc-sections, nor do a bunch of others
#...

View File

@ -2,7 +2,7 @@
#ld: -shared -z defs --gc-sections -T pr21562d.t
#readelf: -s -S --wide
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: [is_generic] h8300-*-* hppa64-*-* mep-*-* mn10200-*-*
#xfail: [is_generic] hppa64-*-* mep-*-* mn10200-*-* ![check_shared_lib_support]
# generic linker targets don't support --gc-sections, nor do a bunch of others
#...

View File

@ -2,7 +2,7 @@
#ld: -shared -z defs --gc-sections -T pr21562d.t
#readelf: -s -S --wide
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: [is_generic] h8300-*-* hppa64-*-* mep-*-* mn10200-*-*
#xfail: [is_generic] hppa64-*-* mep-*-* mn10200-*-* ![check_shared_lib_support]
# generic linker targets don't support --gc-sections, nor do a bunch of others
#...

View File

@ -2,7 +2,7 @@
#ld: -shared --no-define-common
#readelf: --dyn-syms
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
#...
.*: 0+0 +0 +OBJECT +GLOBAL +DEFAULT +UND foo

View File

@ -2,7 +2,7 @@
#ld: -shared
#readelf: --dyn-syms
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
#...
.*: [0-9a-f]+ +4 +OBJECT +GLOBAL +DEFAULT +[0-9]+ foo

View File

@ -1,5 +1,5 @@
#source: pr21903.s
#ld: --no-define-common -pie
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_pie_support]
#error: --no-define-common may not be used without -shared

View File

@ -3,7 +3,7 @@
#ld: -pie --no-dynamic-linker
#readelf: -r -x .data.rel.ro
#target: *-*-linux* *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_pie_support]
There are no relocations in this file.

View File

@ -4,7 +4,7 @@
#readelf: -r -x .data.rel.ro
#warning: -z dynamic-undefined-weak ignored
#target: *-*-linux* *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_pie_support]
There are no relocations in this file.

View File

@ -2,7 +2,7 @@
#ld: -shared -z separate-code -z relro
#readelf: -l --wide
#target: *-*-linux-gnu *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
#failif
#...

View File

@ -2,7 +2,7 @@
#ld: -shared -z relro -z separate-code
#readelf: -l --wide
#target: *-*-linux-gnu *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
#failif
#...

View File

@ -2,7 +2,7 @@
#ld: -pie -z separate-code
#readelf: -l --wide
#target: *-*-linux-gnu *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_pie_support]
#failif
#...

View File

@ -2,7 +2,7 @@
#ld: -pie -z separate-code
#readelf: -l --wide
#target: *-*-linux-gnu *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_pie_support]
#failif
#...

View File

@ -2,7 +2,7 @@
#ld: -z separate-code
#readelf: -l --wide
#target: *-*-linux-gnu *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: h8300-*-* rx-*-linux*
#failif
#...

View File

@ -2,7 +2,7 @@
#ld: -z separate-code
#readelf: -l --wide
#target: *-*-linux-gnu *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: h8300-*-* rx-*-linux*
#failif
#...

View File

@ -2,7 +2,7 @@
#readelf: -l -W
#ld: -pie --dynamic-linker=/usr/lib/ld.so.1
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_pie_support]
#...
+PHDR +0x[0-9a-f]+ +0x[0-9a-f]+ +0x[0-9a-f]+ +0x[0-9a-f]+ +0x[0-9a-f]+ +R +0x[48]?

View File

@ -6,7 +6,7 @@
#ld: --build-id -shared
#readelf: -l --wide
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
#...
+[0-9]+ +\.note\.4 \.note\.1 +

View File

@ -2,7 +2,7 @@
#ld: -shared -version-script pr13195.t
#nm: -D
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-* hppa64-*-*
#xfail: hppa64-*-* ![check_shared_lib_support]
# h8300 doesn't support -shared, and hppa64 creates .foo
#..

View File

@ -2,7 +2,7 @@
#readelf: -d -W
#ld: -shared -rpath=. --disable-new-dtags
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
#failif
#...

View File

@ -2,7 +2,7 @@
#readelf: -d -W
#ld: -shared -rpath=. --disable-new-dtags
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
#...
+0x[0-9a-f]+ +\(RPATH\) +Library rpath: +\[.\]

View File

@ -2,7 +2,7 @@
#readelf: -d -W
#ld: -shared -rpath . --enable-new-dtags
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
#failif
#...

View File

@ -2,7 +2,7 @@
#readelf: -d -W
#ld: -shared -rpath . --enable-new-dtags
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
#...
+0x[0-9a-f]+ +\(RUNPATH\) +Library runpath: +\[.\]

View File

@ -2,7 +2,7 @@
#ld: -shared
#readelf: -sW
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
Symbol table '\.dynsym' contains [0-9]+ entries:
+Num: +Value +Size Type +Bind +Vis +Ndx Name

View File

@ -2,7 +2,7 @@
#ld: -shared
#readelf: -sW
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
Symbol table '\.dynsym' contains [0-9]+ entries:
+Num: +Value +Size Type +Bind +Vis +Ndx Name

View File

@ -1,7 +1,7 @@
#ld: -shared
#readelf: -W -x .strtab
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
#failif
#...

View File

@ -2,7 +2,7 @@
#ld: -Ttext-segment 0x7000000 -z max-page-size=0x200000 -z noseparate-code
#readelf: -l --wide
#target: *-*-linux-gnu *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: h8300-*-* rx-*-linux*
#...
LOAD +0x0+ 0x0*7000000 0x0*7000000 0x0*[0-9a-f][0-9a-f][0-9a-f] 0x0*[0-9a-f][0-9a-f][0-9a-f] R E 0x200000

View File

@ -2,7 +2,7 @@
#ld: -shared -Ttext-segment 0x7000000 -z max-page-size=0x200000 -z noseparate-code
#readelf: -l --wide
#target: *-*-linux-gnu *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
#...
LOAD +0x0+ 0x0*7000000 0x0*7000000 0x0*[0-9a-f]+ 0x0*[0-9a-f]+ R[ W]E 0x200000

View File

@ -2,7 +2,7 @@
#ld: -z max-page-size=0x10000 -Ttext-segment 0x10000 -z noseparate-code
#readelf: -l --wide
#target: *-*-linux-gnu *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: h8300-*-* rx-*-linux*
#...
LOAD +0x0+ 0x0*10000 0x0*10000 0x0*[0-9a-f][0-9a-f][0-9a-f] 0x0*[0-9a-f][0-9a-f][0-9a-f] R E 0x10000

View File

@ -1,5 +1,5 @@
#source: maxpage1.s
#ld: -shared -z max-page-size=0x200000 -Ttext-segment 0x10000
#target: *-*-linux-gnu *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
#warning: .*address of `text-segment' isn't multiple of maximum page size

View File

@ -2,7 +2,7 @@
#ld: -shared -z max-page-size=0x10000 -Ttext-segment 0x10000 -z noseparate-code
#readelf: -l --wide
#target: *-*-linux-gnu *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
#...
LOAD +0x0+ 0x0*10000 0x0*10000 0x0*[0-9a-f]+ 0x0*[0-9a-f]+ R[ W]E 0x10000

View File

@ -2,7 +2,7 @@
#ld: -shared
#readelf: -S
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
#...
\[[ 0-9]+\] \.note.foo[ \t]+NOTE[ \t]+.*

View File

@ -3,7 +3,7 @@
#ld: -shared --entry foo tmpdir/libentry.a
#nm: -n
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
#...
[0-9a-f]+ T +foo

View File

@ -3,7 +3,7 @@
#ld: -shared --entry foo -u foo tmpdir/libentry.a
#nm: -n
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
#xfail: h8300-*-*
#xfail: ![check_shared_lib_support]
#...
[0-9a-f]+ T +foo