diff options
Diffstat (limited to 'ld/testsuite')
64 files changed, 181 insertions, 177 deletions
diff --git a/ld/testsuite/ld-arm/arm-elf.exp b/ld/testsuite/ld-arm/arm-elf.exp index cacd3bd..d193498 100644 --- a/ld/testsuite/ld-arm/arm-elf.exp +++ b/ld/testsuite/ld-arm/arm-elf.exp @@ -319,7 +319,7 @@ append armelftests_common $tmp run_ld_link_tests $armelftests_common -set armelftests_nonacl { +set armelftests { {"Thumb-1 BL" "-Ttext 0x1000 --section-start .foo=0x401000" "" "" {thumb1-bl.s} {{objdump -dr thumb1-bl.d}} "thumb1-bl"} @@ -351,14 +351,14 @@ set tmp { {{objdump -fdw arm-app.d} {objdump -Rw arm-app.r}} "arm-app"} } -if [check_shared_lib_support] { append armelftests_nonacl $tmp } +if [check_shared_lib_support] { append armelftests $tmp } set tmp { {"Simple static application without .rel.plt in linker script" "-T arm-no-rel-plt.ld" "" "" {arm-static-app.s} {{objdump -fdw arm-static-app.d} {objdump -rw arm-static-app.r}} "arm-static-app-no-rel-plt"} } -append armelftests_nonacl $tmp +append armelftests $tmp set tmp { {"Simple dynamic application without .rel.plt in linker script" "tmpdir/arm-lib.so -T arm-no-rel-plt.ld" "" "" {arm-app.s} @@ -406,11 +406,9 @@ set tmp { {{objdump -fdw tls-lib-loc.d} {objdump -Rw tls-lib-loc.r}} "tls-lib-loc.so"} } -if [check_shared_lib_support] { append armelftests_nonacl $tmp } +if [check_shared_lib_support] { append armelftests $tmp } -if { ![istarget "arm*-*-nacl*"] } { - run_ld_link_tests $armelftests_nonacl -} +run_ld_link_tests $armelftests run_dump_test "group-relocs-alu-bad" run_dump_test "group-relocs-alu-bad-2" @@ -437,7 +435,7 @@ if { [istarget "arm*-*-netbsd*"] } { return } -if { ![istarget "arm*-*-*eabi*"] && ![istarget "arm*-*-nacl*"] } { +if { ![istarget "arm*-*-*eabi*"] } { # Special variants of these tests, as a different farcall stub is # generated for a non-ARM-EABI target: indeed in such a case, # there are no attributes to indicate that blx can be used. @@ -457,11 +455,7 @@ if { ![istarget "arm*-*-*eabi*"] && ![istarget "arm*-*-nacl*"] } { # Farcalls stubs are fully supported for ARM-EABI only. # This list is massaged below into run_ld_link_tests standard format. -# The source list is almost that same format. The one difference is -# that each "action" (elements of element 5) might have four elements -# instead of three; in that case, the fourth element is the name of -# the dump file to use for arm*-*nacl* targets instead of the canonical -# dump file (the third element). +# The source list is almost that same format. set armeabitests_common { {"EABI attribute merging" "-r" "" "" {attr-merge.s attr-merge.s} {{readelf -A attr-merge.attr}} @@ -522,20 +516,20 @@ set armeabitests_common { "movw-merge"} {"ARM-ARM farcall" "-Ttext 0x1000 --section-start .foo=0x2001020" "" "" {farcall-arm-arm.s} - {{objdump -d farcall-arm-arm.d farcall-arm-nacl.d}} + {{objdump -d farcall-arm-arm.d}} "farcall-arm-arm"} {"ARM-ARM farcall (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001020 --pic-veneer" "" "" {farcall-arm-arm.s} - {{objdump -d farcall-arm-arm-pic-veneer.d farcall-arm-nacl-pic.d}} + {{objdump -d farcall-arm-arm-pic-veneer.d}} "farcall-arm-arm-pic-veneer"} {"ARM-ARM farcall (BE8)" "-Ttext 0x1000 --section-start .foo=0x2001020 -EB --be8" "" "-EB" {farcall-arm-arm.s} - {{objdump -d farcall-arm-arm.d farcall-arm-nacl.d}} + {{objdump -d farcall-arm-arm.d}} "farcall-arm-arm-be8"} {"ARM-ARM farcall (BE)" "-Ttext 0x1000 --section-start .foo=0x2001020 -EB" "" "-EB" {farcall-arm-arm.s} - {{objdump -d farcall-arm-arm.d farcall-arm-nacl.d}} + {{objdump -d farcall-arm-arm.d}} "farcall-arm-arm-be"} {"Long branch with mixed text and data" "-T arm.ld" "" "" {farcall-data.s} - {{objdump -dr farcall-data.d farcall-data-nacl.d}} + {{objdump -dr farcall-data.d}} "farcall-data"} {"callweak-2" "-static -T arm.ld" "" "" {callweak-2.s} {{objdump -dr callweak-2.d}} @@ -553,7 +547,7 @@ set armeabitests_common_shared { if [check_shared_lib_support] { append armeabitests_common $armeabitests_common_shared} -set armeabitests_nonacl { +set armeabitests { {"ARM-Thumb farcall" "-Ttext 0x1000 --section-start .foo=0x2001014" "" "" {farcall-arm-thumb.s} {{objdump -d farcall-arm-thumb.d}} "farcall-arm-thumb"} @@ -949,7 +943,7 @@ set armeabitests_nonacl { "arm-pic-veneer"} } -set armeabitests_nonacl_shared { +set armeabitests_shared { {"TLS gnu shared library" "--no-fix-arm1176 -shared -T arm-dyn.ld --hash-style=sysv" "" "" {tls-gdesc.s} @@ -1107,7 +1101,7 @@ set armeabitests_nonacl_shared { {{readelf -Ds preempt-app.sym}} "preempt-app"} } -if [check_shared_lib_support] { append armeabitests_nonacl $armeabitests_nonacl_shared} +if [check_shared_lib_support] { append armeabitests $armeabitests_shared} set armfdpiceabitests { @@ -1152,10 +1146,6 @@ set armfdpiceabitests { # Massage the $armeabitests_common list into run_ld_link_tests standard form. # See the comment before 'set armeabitests_common', above. set elide_action_elt 3 -set is_nacl [istarget "arm*-*-nacl*"] -if {$is_nacl} { - set elide_action_elt 2 -} set neabi_common [llength $armeabitests_common] for {set i 0} {$i < $neabi_common} {incr i} { set case [lindex $armeabitests_common $i] @@ -1171,9 +1161,7 @@ for {set i 0} {$i < $neabi_common} {incr i} { } run_ld_link_tests $armeabitests_common -if { !$is_nacl } { - run_ld_link_tests $armeabitests_nonacl -} +run_ld_link_tests $armeabitests if { [istarget "arm*-*-uclinuxfdpiceabi"] } { run_ld_link_tests $armfdpiceabitests @@ -1255,7 +1243,7 @@ run_dump_test "attr-merge-nosection-1" run_dump_test "attr-merge-hardfp-use-1" run_dump_test "attr-merge-hardfp-use-2" run_dump_test "unresolved-1" -if { !$is_nacl && [check_shared_lib_support] } { +if { [check_shared_lib_support] } { run_dump_test "unresolved-1-dyn" } run_dump_test "unresolved-2" @@ -1281,7 +1269,7 @@ run_dump_test "non-contiguous-arm5" run_dump_test "non-contiguous-arm6" run_dump_test "non-contiguous-arm7" -if { !$is_nacl && [check_shared_lib_support] } { +if { [check_shared_lib_support] } { run_dump_test "thumb-plt" run_dump_test "thumb-plt-got" } diff --git a/ld/testsuite/ld-arm/cortex-a8-far.d b/ld/testsuite/ld-arm/cortex-a8-far.d index a87cd5d..5c7c6fb 100644 --- a/ld/testsuite/ld-arm/cortex-a8-far.d +++ b/ld/testsuite/ld-arm/cortex-a8-far.d @@ -1,4 +1,4 @@ -#target: *-*-*eabi* *-*-nacl* +#target: *-*-*eabi* .*: file format .* diff --git a/ld/testsuite/ld-arm/farcall-arm-nacl-pic.d b/ld/testsuite/ld-arm/farcall-arm-nacl-pic.d deleted file mode 100644 index a39a468..0000000 --- a/ld/testsuite/ld-arm/farcall-arm-nacl-pic.d +++ /dev/null @@ -1,20 +0,0 @@ -.*: file format .* - -Disassembly of section \.text: - -0+1000 <_start>: -\s*1000:\s+eb000002\s+bl\s+1010 <__bar_veneer> -#... - -0+1010 <__bar_veneer>: -\s*1010:\s+e59fc00c\s+ldr\s+ip, \[pc, #12\]\s+@ 1024 <__bar_veneer\+0x14> -\s*1014:\s+e08cc00f\s+add\s+ip, ip, pc -\s*1018:\s+e3ccc13f\s+bic\s+ip, ip, #-1073741809\s+@ 0xc000000f -\s*101c:\s+e12fff1c\s+bx\s+ip -\s*1020:\s+e125be70\s+bkpt\s+0x5be0 -\s*1024:\s+02000004\s+.word\s+0x02000004 -#... - -\s*Disassembly of section \.foo: -\s*02001020 <bar>: -\s*2001020:\s+e12fff1e\s+bx\s+lr diff --git a/ld/testsuite/ld-arm/farcall-arm-nacl.d b/ld/testsuite/ld-arm/farcall-arm-nacl.d deleted file mode 100644 index 0431f4a..0000000 --- a/ld/testsuite/ld-arm/farcall-arm-nacl.d +++ /dev/null @@ -1,20 +0,0 @@ -.*: file format .* - -Disassembly of section \.text: - -0+1000 <_start>: -\s*1000:\s+eb000002\s+bl\s+1010 <__bar_veneer> -#... - -0+1010 <__bar_veneer>: -\s*1010:\s+e59fc00c\s+ldr\s+ip, \[pc, #12\]\s+@ 1024 <__bar_veneer\+0x14> -\s*1014:\s+e3ccc13f\s+bic\s+ip, ip, #-1073741809\s+@ 0xc000000f -\s*1018:\s+e12fff1c\s+bx\s+ip -\s*101c:\s+e320f000\s+nop\s+\{0\} -\s*1020:\s+e125be70\s+bkpt\s+0x5be0 -\s*1024:\s+02001020\s+.word\s+0x02001020 -#... - -\s*Disassembly of section \.foo: -\s*02001020 <bar>: -\s*2001020:\s+e12fff1e\s+bx\s+lr diff --git a/ld/testsuite/ld-arm/farcall-data-nacl.d b/ld/testsuite/ld-arm/farcall-data-nacl.d deleted file mode 100644 index 2c51fe8..0000000 --- a/ld/testsuite/ld-arm/farcall-data-nacl.d +++ /dev/null @@ -1,24 +0,0 @@ -.*: file format .* - -Disassembly of section .text: - -0+8000 <_start>: -\s*8000:\s+ea000002\s+b\s+8010 <__far_veneer> -#... - -0+8010 <__far_veneer>: -\s*8010:\s+e59fc00c\s+ldr\s+ip, \[pc, #12\]\s+@ 8024 <__far_veneer\+0x14> -\s*8014:\s+e3ccc13f\s+bic\s+ip, ip, #-1073741809\s+@ 0xc000000f -\s*8018:\s+e12fff1c\s+bx\s+ip -\s*801c:\s+e320f000\s+nop\s+\{0\} -\s*8020:\s+e125be70\s+bkpt\s+0x5be0 -\s*8024:\s+12340000\s+.word\s+0x12340000 -#... - -0+8030 <after>: -\s*8030:\s+11111111\s+\.word\s+0x11111111 - -Disassembly of section \.far: - -12340000 <far>: -12340000:\s+e12fff1e\s+bx\s+lr diff --git a/ld/testsuite/ld-arm/farcall-thumb2-purecode-consecutive-veneer.d b/ld/testsuite/ld-arm/farcall-thumb2-purecode-consecutive-veneer.d index b89da03..0d74ca3 100644 --- a/ld/testsuite/ld-arm/farcall-thumb2-purecode-consecutive-veneer.d +++ b/ld/testsuite/ld-arm/farcall-thumb2-purecode-consecutive-veneer.d @@ -11,17 +11,17 @@ Disassembly of section .text: Disassembly of section .foo: 02001020 <_start>: - 2001020: f000 f802 bl 2001028 <__bar_veneer> - 2001024: f000 f806 bl 2001034 <__baz_veneer> + 2001020: f000 f808 bl 2001034 <__bar_veneer> + 2001024: f000 f800 bl 2001028 <__baz_veneer> -02001028 <__bar_veneer>: - 2001028: f241 0c01 movw ip, #4097 @ 0x1001 +02001028 <__baz_veneer>: + 2001028: f241 0c03 movw ip, #4099 @ 0x1003 200102c: f2c0 0c00 movt ip, #0 2001030: 4760 bx ip 2001032: bf00 nop -02001034 <__baz_veneer>: - 2001034: f241 0c03 movw ip, #4099 @ 0x1003 +02001034 <__bar_veneer>: + 2001034: f241 0c01 movw ip, #4097 @ 0x1001 2001038: f2c0 0c00 movt ip, #0 200103c: 4760 bx ip 200103e: bf00 nop diff --git a/ld/testsuite/ld-arm/non-contiguous-arm3.d b/ld/testsuite/ld-arm/non-contiguous-arm3.d index 2912f35..ab83b5e 100644 --- a/ld/testsuite/ld-arm/non-contiguous-arm3.d +++ b/ld/testsuite/ld-arm/non-contiguous-arm3.d @@ -3,7 +3,6 @@ #ld: --enable-non-contiguous-regions -T non-contiguous-arm3.ld -z max-page-size=0x10000 #objdump: -rdth #xfail: [is_generic] -#skip: arm*nacl .*: file format elf32-(little|big)arm diff --git a/ld/testsuite/ld-arm/non-contiguous-arm6.d b/ld/testsuite/ld-arm/non-contiguous-arm6.d index 3d737f0..c21cb4c 100644 --- a/ld/testsuite/ld-arm/non-contiguous-arm6.d +++ b/ld/testsuite/ld-arm/non-contiguous-arm6.d @@ -3,7 +3,6 @@ #ld: --enable-non-contiguous-regions -T non-contiguous-arm6.ld -z max-page-size=0x10000 #objdump: -rdth #xfail: [is_generic] -#skip: arm*nacl .*: file format elf32-(little|big)arm diff --git a/ld/testsuite/ld-elf/binutils.exp b/ld/testsuite/ld-elf/binutils.exp index 578b639..4fd2eab 100644 --- a/ld/testsuite/ld-elf/binutils.exp +++ b/ld/testsuite/ld-elf/binutils.exp @@ -25,7 +25,6 @@ if { !([istarget *-*-linux*] || [istarget arm*-*-uclinuxfdpiceabi] - || [istarget *-*-nacl*] || [istarget *-*-gnu*]) || [istarget *ecoff] } then { return } diff --git a/ld/testsuite/ld-elf/build-id.exp b/ld/testsuite/ld-elf/build-id.exp index 3c83743..1b97e24 100644 --- a/ld/testsuite/ld-elf/build-id.exp +++ b/ld/testsuite/ld-elf/build-id.exp @@ -31,7 +31,6 @@ if { [istarget frv-*-*] || [istarget lm32-*-*] } { if { !([istarget *-*-linux*] || [istarget arm*-*-uclinuxfdpiceabi] - || [istarget *-*-nacl*] || [istarget *-*-gnu*]) } then { return } diff --git a/ld/testsuite/ld-elf/ehdr_start-missing.d b/ld/testsuite/ld-elf/ehdr_start-missing.d index 3fb85e0..2374696 100644 --- a/ld/testsuite/ld-elf/ehdr_start-missing.d +++ b/ld/testsuite/ld-elf/ehdr_start-missing.d @@ -1,5 +1,5 @@ #source: ehdr_start-strongref.s #ld: -e _start -T ehdr_start-missing.t --no-dynamic-linker #error: .*: undefined reference to `__ehdr_start' -#target: *-*-linux* *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi +#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi #xfail: bfin-*-* diff --git a/ld/testsuite/ld-elf/ehdr_start-shared.d b/ld/testsuite/ld-elf/ehdr_start-shared.d index a2a4dcc..319cd93 100644 --- a/ld/testsuite/ld-elf/ehdr_start-shared.d +++ b/ld/testsuite/ld-elf/ehdr_start-shared.d @@ -1,7 +1,7 @@ #source: ehdr_start.s #ld: -e _start -shared -z notext #nm: -n -#target: *-*-linux* *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi +#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi #xfail: bfin-*-* cris*-*-* frv-*-* lm32-*-* ![check_shared_lib_support] #... diff --git a/ld/testsuite/ld-elf/ehdr_start-userdef.d b/ld/testsuite/ld-elf/ehdr_start-userdef.d index 93ed0d8..b41436e 100644 --- a/ld/testsuite/ld-elf/ehdr_start-userdef.d +++ b/ld/testsuite/ld-elf/ehdr_start-userdef.d @@ -1,7 +1,7 @@ #source: ehdr_start-strongref.s #ld: -e _start -T ehdr_start-userdef.t #readelf: -Ws -#target: *-*-linux* *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi +#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi #xfail: bfin-*-* frv-*-* #... diff --git a/ld/testsuite/ld-elf/ehdr_start-weak.d b/ld/testsuite/ld-elf/ehdr_start-weak.d index c4f9072..d77a464 100644 --- a/ld/testsuite/ld-elf/ehdr_start-weak.d +++ b/ld/testsuite/ld-elf/ehdr_start-weak.d @@ -1,7 +1,7 @@ #source: ehdr_start.s #ld: -e _start -T ehdr_start-missing.t --no-dynamic-linker #nm: -n -#target: *-*-linux* *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi +#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi #xfail: bfin-*-* frv-*-* #failif diff --git a/ld/testsuite/ld-elf/ehdr_start.d b/ld/testsuite/ld-elf/ehdr_start.d index 0ec3b13..2e9a2fa 100644 --- a/ld/testsuite/ld-elf/ehdr_start.d +++ b/ld/testsuite/ld-elf/ehdr_start.d @@ -1,7 +1,7 @@ #source: ehdr_start.s #ld: -e _start --build-id #nm: -n -#target: *-*-linux* *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi +#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi #xfail: bfin-*-* frv-*-* lm32-*-* #... diff --git a/ld/testsuite/ld-elf/elf.exp b/ld/testsuite/ld-elf/elf.exp index 7e69940..1ae1af9 100644 --- a/ld/testsuite/ld-elf/elf.exp +++ b/ld/testsuite/ld-elf/elf.exp @@ -229,7 +229,6 @@ proc target_defaults_to_execstack {} { } if { [istarget *-*-*linux*] - || [istarget *-*-nacl*] || [istarget *-*-gnu*] } { run_ld_link_tests [list \ [list "stack exec" \ @@ -445,7 +444,6 @@ set xfails "*-*-netbsd*" run_ld_link_exec_tests $array_tests $xfails if { [istarget *-*-linux*] - || [istarget *-*-nacl*] || [istarget *-*-gnu*] } { run_ld_link_exec_tests $array_tests_pie $xfails diff --git a/ld/testsuite/ld-elf/export-class.exp b/ld/testsuite/ld-elf/export-class.exp index 7a84755..f4a0634 100644 --- a/ld/testsuite/ld-elf/export-class.exp +++ b/ld/testsuite/ld-elf/export-class.exp @@ -33,7 +33,6 @@ if { ![is_elf_format] || ![check_shared_lib_support] } { # if you like. if { ![istarget *-*-linux*] && ![istarget arm*-*-uclinuxfdpiceabi] - && ![istarget *-*-nacl*] && ![istarget *-*-gnu*] } { return } diff --git a/ld/testsuite/ld-elf/fatal-warnings-1a.d b/ld/testsuite/ld-elf/fatal-warnings-1a.d index 7afee53..a8632ba 100644 --- a/ld/testsuite/ld-elf/fatal-warnings-1a.d +++ b/ld/testsuite/ld-elf/fatal-warnings-1a.d @@ -3,4 +3,4 @@ #ld: --no-dynamic-linker --fatal-warnings -z dynamic-undefined-weak #readelf: -r -x .data.rel.ro #error: unsupported option: -z dynamic-undefined-weak -#target: *-*-linux* *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi +#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi diff --git a/ld/testsuite/ld-elf/fatal-warnings-1b.d b/ld/testsuite/ld-elf/fatal-warnings-1b.d index 70862b2..34aaf10 100644 --- a/ld/testsuite/ld-elf/fatal-warnings-1b.d +++ b/ld/testsuite/ld-elf/fatal-warnings-1b.d @@ -3,4 +3,4 @@ #ld: --no-dynamic-linker -z dynamic-undefined-weak --fatal-warnings #readelf: -r -x .data.rel.ro #error: unsupported option: -z dynamic-undefined-weak -#target: *-*-linux* *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi +#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi diff --git a/ld/testsuite/ld-elf/indirect.exp b/ld/testsuite/ld-elf/indirect.exp index 9a0bcb2..3d9cc2a 100644 --- a/ld/testsuite/ld-elf/indirect.exp +++ b/ld/testsuite/ld-elf/indirect.exp @@ -189,14 +189,21 @@ set run_tests [list \ {check-ptr-eq.c} "pr18720d" "pr18720.out"] \ [list "Run with libpr19553b.so" \ "-Wl,--no-as-needed tmpdir/libpr19553b.so tmpdir/libpr19553d.so -Wl,-rpath-link,." "" \ - {pr19553a.c} "pr19553b" "pr19553b.out"] \ + {pr19553a.c} "pr19553b" "pr19553b.out"] +] + +# This test relies on versioned symbols, which Solaris ld.so.1 doesn't support. +if { ![istarget *-*-solaris2*] } { + lappend run_tests \ [list "Run with libpr19553c.so" \ "-Wl,--no-as-needed tmpdir/libpr19553c.so tmpdir/libpr19553b.so tmpdir/libpr19553d.so" "" \ - {pr19553a.c} "pr19553c" "pr19553c.out"] \ + {pr19553a.c} "pr19553c" "pr19553c.out"] +} + +lappend run_tests \ [list "Run with libpr19553d.so" \ "-Wl,--no-as-needed tmpdir/libpr19553d.so tmpdir/libpr19553b.so -Wl,-rpath-link,." "" \ - {pr19553a.c} "pr19553d" "pr19553d.out"] \ -] + {pr19553a.c} "pr19553d" "pr19553d.out"] run_ld_link_exec_tests $run_tests diff --git a/ld/testsuite/ld-elf/orphan-region.d b/ld/testsuite/ld-elf/orphan-region.d index 3f5bfd7..ef21ec3 100644 --- a/ld/testsuite/ld-elf/orphan-region.d +++ b/ld/testsuite/ld-elf/orphan-region.d @@ -1,9 +1,9 @@ #source: orphan-region.s #ld: -T orphan-region.ld -N -z stack-size=0 --no-warn-rwx-segments #readelf: -S -l --wide -#xfail: [uses_genelf] hppa*64*-*-* spu-*-* *-*-nacl* +#xfail: [uses_genelf] hppa*64*-*-* spu-*-* # if not using elf.em, you don't get fancy orphan handling -# spu twiddles LOAD range, hppa64 adds PHDR, nacl splits to two segments +# spu twiddles LOAD range, hppa64 adds PHDR #... \[[ 0-9]+\] \.text[ \t]+PROGBITS[ \t]+0*40000000[ \t]+.* diff --git a/ld/testsuite/ld-elf/package-note.exp b/ld/testsuite/ld-elf/package-note.exp index 5ad3cf5..7249cb7 100644 --- a/ld/testsuite/ld-elf/package-note.exp +++ b/ld/testsuite/ld-elf/package-note.exp @@ -27,7 +27,6 @@ if ![is_elf_format] { if { !([istarget *-*-linux*] || [istarget arm*-*-uclinuxfdpiceabi] - || [istarget *-*-nacl*] || [istarget *-*-gnu*]) } then { return } diff --git a/ld/testsuite/ld-elf/pr16322.d b/ld/testsuite/ld-elf/pr16322.d index 1e9175c..914d631 100644 --- a/ld/testsuite/ld-elf/pr16322.d +++ b/ld/testsuite/ld-elf/pr16322.d @@ -1,6 +1,6 @@ #ld: -shared -z relro -z noseparate-code #readelf: -l --wide -#target: *-*-linux-gnu *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi +#target: *-*-linux-gnu *-*-gnu* arm*-*-uclinuxfdpiceabi #xfail: ![check_shared_lib_support] #xfail: ![check_relro_support] diff --git a/ld/testsuite/ld-elf/pr16498a.d b/ld/testsuite/ld-elf/pr16498a.d index de68389..8690aaf 100644 --- a/ld/testsuite/ld-elf/pr16498a.d +++ b/ld/testsuite/ld-elf/pr16498a.d @@ -1,6 +1,6 @@ #ld: -shared -T pr16498a.t #readelf: -l --wide -#target: *-*-linux* *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi +#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi #xfail: ![check_shared_lib_support] #... diff --git a/ld/testsuite/ld-elf/pr16498b.d b/ld/testsuite/ld-elf/pr16498b.d index aceb307..433e281 100644 --- a/ld/testsuite/ld-elf/pr16498b.d +++ b/ld/testsuite/ld-elf/pr16498b.d @@ -1,7 +1,7 @@ #source: pr16498a.s #ld: -shared -T pr16498b.t #readelf: -l --wide -#target: *-*-linux* *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi +#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi #xfail: ![check_shared_lib_support] #... diff --git a/ld/testsuite/ld-elf/pr19162.d b/ld/testsuite/ld-elf/pr19162.d index 1e7c1a9..bb5af3b 100644 --- a/ld/testsuite/ld-elf/pr19162.d +++ b/ld/testsuite/ld-elf/pr19162.d @@ -2,7 +2,7 @@ #source: pr19162b.s #ld: -shared -z max-page-size=0x200000 -z noseparate-code #readelf: -l --wide -#target: *-*-linux* *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi +#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi #xfail: hppa*-*-* ![check_shared_lib_support] # hppa fails due to PR 12376. diff --git a/ld/testsuite/ld-elf/pr22269a.d b/ld/testsuite/ld-elf/pr22269a.d index 8644d0e..a4af8fe 100644 --- a/ld/testsuite/ld-elf/pr22269a.d +++ b/ld/testsuite/ld-elf/pr22269a.d @@ -2,7 +2,7 @@ #source: pr22269.s #ld: -pie --no-dynamic-linker #readelf: -r -x .data.rel.ro -#target: *-*-linux* *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi +#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi # The BFIN target always generates a relocation. #xfail: ![check_pie_support] || bfin-*-* diff --git a/ld/testsuite/ld-elf/pr22269b.d b/ld/testsuite/ld-elf/pr22269b.d index 1d8e7bd..f3cedc4 100644 --- a/ld/testsuite/ld-elf/pr22269b.d +++ b/ld/testsuite/ld-elf/pr22269b.d @@ -3,7 +3,7 @@ #ld: -pie --no-dynamic-linker -z dynamic-undefined-weak #readelf: -r -x .data.rel.ro #warning: -z dynamic-undefined-weak ignored -#target: *-*-linux* *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi +#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi # The BFIN target always generates a relocation. #xfail: ![check_pie_support] || bfin-*-* diff --git a/ld/testsuite/ld-elf/pr22393-1a.d b/ld/testsuite/ld-elf/pr22393-1a.d index 2bfa403..c832cc1 100644 --- a/ld/testsuite/ld-elf/pr22393-1a.d +++ b/ld/testsuite/ld-elf/pr22393-1a.d @@ -1,7 +1,7 @@ #source: pr22393-1.s #ld: -shared -z separate-code -z relro #readelf: -l --wide -#target: *-*-linux-gnu *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi +#target: *-*-linux-gnu *-*-gnu* arm*-*-uclinuxfdpiceabi #xfail: ![check_shared_lib_support] #xfail: ![check_relro_support] diff --git a/ld/testsuite/ld-elf/pr22393-1b.d b/ld/testsuite/ld-elf/pr22393-1b.d index 96d8bc0..f624014 100644 --- a/ld/testsuite/ld-elf/pr22393-1b.d +++ b/ld/testsuite/ld-elf/pr22393-1b.d @@ -1,7 +1,7 @@ #source: pr22393-1.s #ld: -shared -z relro -z separate-code #readelf: -l --wide -#target: *-*-linux-gnu *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi +#target: *-*-linux-gnu *-*-gnu* arm*-*-uclinuxfdpiceabi #xfail: ![check_shared_lib_support] #xfail: ![check_relro_support] diff --git a/ld/testsuite/ld-elf/pr22393-1c.d b/ld/testsuite/ld-elf/pr22393-1c.d index c34dab3..648200d 100644 --- a/ld/testsuite/ld-elf/pr22393-1c.d +++ b/ld/testsuite/ld-elf/pr22393-1c.d @@ -1,7 +1,7 @@ #source: pr22393-1.s #ld: -pie -z separate-code #readelf: -l --wide -#target: *-*-linux-gnu *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi +#target: *-*-linux-gnu *-*-gnu* arm*-*-uclinuxfdpiceabi #xfail: ![check_pie_support] #failif diff --git a/ld/testsuite/ld-elf/pr22393-1d.d b/ld/testsuite/ld-elf/pr22393-1d.d index 4723e53..1191883 100644 --- a/ld/testsuite/ld-elf/pr22393-1d.d +++ b/ld/testsuite/ld-elf/pr22393-1d.d @@ -1,7 +1,7 @@ #source: pr22393-1.s #ld: -pie -z separate-code #readelf: -l --wide -#target: *-*-linux-gnu *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi +#target: *-*-linux-gnu *-*-gnu* arm*-*-uclinuxfdpiceabi #xfail: ![check_pie_support] #failif diff --git a/ld/testsuite/ld-elf/pr22393-1e.d b/ld/testsuite/ld-elf/pr22393-1e.d index 55f7e9a..3f3516b 100644 --- a/ld/testsuite/ld-elf/pr22393-1e.d +++ b/ld/testsuite/ld-elf/pr22393-1e.d @@ -1,7 +1,7 @@ #source: pr22393-1.s #ld: -z separate-code #readelf: -l --wide -#target: *-*-linux-gnu *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi +#target: *-*-linux-gnu *-*-gnu* arm*-*-uclinuxfdpiceabi #xfail: rx-*-linux* #failif diff --git a/ld/testsuite/ld-elf/pr22393-1f.d b/ld/testsuite/ld-elf/pr22393-1f.d index bc61b63..97be4f6 100644 --- a/ld/testsuite/ld-elf/pr22393-1f.d +++ b/ld/testsuite/ld-elf/pr22393-1f.d @@ -1,7 +1,7 @@ #source: pr22393-1.s #ld: -z separate-code #readelf: -l --wide -#target: *-*-linux-gnu *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi +#target: *-*-linux-gnu *-*-gnu* arm*-*-uclinuxfdpiceabi #xfail: rx-*-linux* #failif diff --git a/ld/testsuite/ld-elf/pr22393-2a.rd b/ld/testsuite/ld-elf/pr22393-2a.rd index a9c5478..4027ed3 100644 --- a/ld/testsuite/ld-elf/pr22393-2a.rd +++ b/ld/testsuite/ld-elf/pr22393-2a.rd @@ -1,7 +1,7 @@ #source: pr22393-1.s #ld: -shared -z separate-code --no-rosegment #readelf: -l --wide -#target: *-*-linux-gnu *-*-gnu* *-*-nacl* +#target: *-*-linux-gnu *-*-gnu* #failif #... diff --git a/ld/testsuite/ld-elf/pr22393-2b.rd b/ld/testsuite/ld-elf/pr22393-2b.rd index a9c5478..4027ed3 100644 --- a/ld/testsuite/ld-elf/pr22393-2b.rd +++ b/ld/testsuite/ld-elf/pr22393-2b.rd @@ -1,7 +1,7 @@ #source: pr22393-1.s #ld: -shared -z separate-code --no-rosegment #readelf: -l --wide -#target: *-*-linux-gnu *-*-gnu* *-*-nacl* +#target: *-*-linux-gnu *-*-gnu* #failif #... diff --git a/ld/testsuite/ld-elf/pr23900-1-32.rd b/ld/testsuite/ld-elf/pr23900-1-32.rd index 953095a..810f9a6 100644 --- a/ld/testsuite/ld-elf/pr23900-1-32.rd +++ b/ld/testsuite/ld-elf/pr23900-1-32.rd @@ -1,7 +1,7 @@ #source: pr23900-1.s #ld: #readelf: -l --wide -#target: *-*-linux* *-*-gnu* *-*-nacl* +#target: *-*-linux* *-*-gnu* #... GNU_PROPERTY .* +0x4 diff --git a/ld/testsuite/ld-elf/pr23900-1-64.rd b/ld/testsuite/ld-elf/pr23900-1-64.rd index 62cd63c..7904767 100644 --- a/ld/testsuite/ld-elf/pr23900-1-64.rd +++ b/ld/testsuite/ld-elf/pr23900-1-64.rd @@ -1,7 +1,7 @@ #source: pr23900-1.s #ld: #readelf: -l --wide -#target: *-*-linux* *-*-gnu* *-*-nacl* +#target: *-*-linux* *-*-gnu* #... GNU_PROPERTY .* +0x8 diff --git a/ld/testsuite/ld-elf/pr23900-1.d b/ld/testsuite/ld-elf/pr23900-1.d index da0fcbb..246cfac 100644 --- a/ld/testsuite/ld-elf/pr23900-1.d +++ b/ld/testsuite/ld-elf/pr23900-1.d @@ -1,6 +1,6 @@ #ld: #readelf: --notes --wide -l -#target: *-*-linux* *-*-gnu* *-*-nacl* +#target: *-*-linux* *-*-gnu* #... GNU_PROPERTY .* diff --git a/ld/testsuite/ld-elf/pr23900-2a.d b/ld/testsuite/ld-elf/pr23900-2a.d index 836606d..6806acd 100644 --- a/ld/testsuite/ld-elf/pr23900-2a.d +++ b/ld/testsuite/ld-elf/pr23900-2a.d @@ -1,7 +1,7 @@ #source: pr23900-2.s #ld: #readelf: --notes --wide -#target: *-*-linux* *-*-gnu* *-*-nacl* +#target: *-*-linux* *-*-gnu* #... Displaying notes found in: \.note diff --git a/ld/testsuite/ld-elf/pr23900-2b.d b/ld/testsuite/ld-elf/pr23900-2b.d index 2aa04d7..5b27fe5 100644 --- a/ld/testsuite/ld-elf/pr23900-2b.d +++ b/ld/testsuite/ld-elf/pr23900-2b.d @@ -1,7 +1,7 @@ #source: pr23900-2.s #ld: #readelf: -l --wide -#target: *-*-linux* *-*-gnu* *-*-nacl* +#target: *-*-linux* *-*-gnu* #failif #... diff --git a/ld/testsuite/ld-elf/pr30508.d b/ld/testsuite/ld-elf/pr30508.d index 1692780..d59b9e9 100644 --- a/ld/testsuite/ld-elf/pr30508.d +++ b/ld/testsuite/ld-elf/pr30508.d @@ -1,7 +1,7 @@ #ld: -z separate-code --no-rosegment #objcopy_linked_file: -R .foo #readelf: -lW -#target: *-*-linux-gnu *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi +#target: *-*-linux-gnu *-*-gnu* arm*-*-uclinuxfdpiceabi #xfail: mips*-*-* rx-*-linux* #... diff --git a/ld/testsuite/ld-elf/pr30907-1.d b/ld/testsuite/ld-elf/pr30907-1.d index ee72bf8..d5d8125 100644 --- a/ld/testsuite/ld-elf/pr30907-1.d +++ b/ld/testsuite/ld-elf/pr30907-1.d @@ -2,7 +2,7 @@ #source: pr22393-1.s #ld: -shared -z separate-code -z relro --rosegment #readelf: -l --wide -#target: *-*-linux-gnu *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi +#target: *-*-linux-gnu *-*-gnu* arm*-*-uclinuxfdpiceabi #xfail: ![check_shared_lib_support] #xfail: ![check_relro_support] diff --git a/ld/testsuite/ld-elf/pr30907-2.d b/ld/testsuite/ld-elf/pr30907-2.d index 7312da9..fed957e 100644 --- a/ld/testsuite/ld-elf/pr30907-2.d +++ b/ld/testsuite/ld-elf/pr30907-2.d @@ -2,7 +2,7 @@ #source: pr22393-1.s #ld: -shared -z separate-code -z relro --rosegment #readelf: -l --wide -#target: *-*-linux-gnu *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi +#target: *-*-linux-gnu *-*-gnu* arm*-*-uclinuxfdpiceabi #xfail: ![check_shared_lib_support] #xfail: ![check_relro_support] diff --git a/ld/testsuite/ld-elf/pr32341.d b/ld/testsuite/ld-elf/pr32341.d index eb76c3a..45777d4 100644 --- a/ld/testsuite/ld-elf/pr32341.d +++ b/ld/testsuite/ld-elf/pr32341.d @@ -1,6 +1,6 @@ #ld: --build-id -z separate-code -z relro --rosegment #readelf: -l --wide -#target: *-*-linux-gnu *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi +#target: *-*-linux-gnu *-*-gnu* arm*-*-uclinuxfdpiceabi #xfail: ![check_relro_support] #failif diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp index 09669b5..84100a7 100644 --- a/ld/testsuite/ld-elf/shared.exp +++ b/ld/testsuite/ld-elf/shared.exp @@ -516,7 +516,6 @@ run_ld_link_tests { if { [istarget *-*-linux*] || [istarget kvx-*-*] - || [istarget *-*-nacl*] || [istarget *-*-gnu*] } { run_ld_link_tests { {"Weak symbols in dynamic objects 1 (support)" @@ -1374,7 +1373,6 @@ run_cc_link_tests $build_cxx_tests run_ld_link_exec_tests $run_cxx_tests if { [istarget *-*-linux*] - || [istarget *-*-nacl*] || [istarget *-*-gnu*] } { run_cc_link_tests [list \ [list \ @@ -1707,7 +1705,6 @@ if [istarget "sparc*-*-*"] { } if { ([istarget "*-*-linux*"] - || [istarget "*-*-nacl*"] || [istarget "*-*-gnu*"]) && ![istarget "mips*-*-*"] } { run_ld_link_tests [list \ diff --git a/ld/testsuite/ld-elf/tls.exp b/ld/testsuite/ld-elf/tls.exp index e53762d..1768399 100644 --- a/ld/testsuite/ld-elf/tls.exp +++ b/ld/testsuite/ld-elf/tls.exp @@ -23,7 +23,6 @@ if { !([istarget *-*-linux*] || [istarget arm*-*-uclinuxfdpiceabi] - || [istarget *-*-nacl*] || [istarget *-*-gnu*]) || [istarget *ecoff] } then { return } diff --git a/ld/testsuite/ld-elf/tls_common.exp b/ld/testsuite/ld-elf/tls_common.exp index 31f36ef..deb22c6 100644 --- a/ld/testsuite/ld-elf/tls_common.exp +++ b/ld/testsuite/ld-elf/tls_common.exp @@ -25,7 +25,6 @@ if { !([istarget *-*-linux*] || [istarget arm*-*-uclinuxfdpiceabi] - || [istarget *-*-nacl*] || [istarget *-*-gnu*]) || [istarget *ecoff] } then { return } diff --git a/ld/testsuite/ld-elfweak/elfweak.exp b/ld/testsuite/ld-elfweak/elfweak.exp index 6e18d93..4e5ac42 100644 --- a/ld/testsuite/ld-elfweak/elfweak.exp +++ b/ld/testsuite/ld-elfweak/elfweak.exp @@ -35,7 +35,8 @@ if { ![check_shared_lib_support] } { # This test can only be run on a couple of ELF platforms. # Square bracket expressions seem to confuse istarget. # This is similar to the test that is used in ld-shared, BTW. -if { ![istarget alpha*-*-linux*] +if { ![istarget *-*-solaris2*] + && ![istarget alpha*-*-linux*] && ![istarget arm*-*-linux*] && ![istarget hppa*64*-*-hpux*] && ![istarget hppa*-*-linux*] @@ -52,10 +53,8 @@ if { ![istarget alpha*-*-linux*] && ![istarget powerpc*-*-sysv4*] && ![istarget sh\[34\]*-*-linux*] && ![istarget sparc*-*-elf] - && ![istarget sparc*-*-solaris2*] && ![istarget sparc*-*-linux*] - && ![istarget x86_64-*-linux*] - && ![istarget *-*-nacl*] } { + && ![istarget x86_64-*-linux*] } { return } diff --git a/ld/testsuite/ld-gc/gc.exp b/ld/testsuite/ld-gc/gc.exp index a1c7bd6..556c947 100644 --- a/ld/testsuite/ld-gc/gc.exp +++ b/ld/testsuite/ld-gc/gc.exp @@ -142,7 +142,6 @@ if { [is_elf_format] && [check_shared_lib_support] } then { if { [check_compiler_available] } { if { [istarget "*-*-linux*"] - || [istarget "*-*-nacl*"] || [istarget "*-*-gnu*"] } { ld_compile "$CC_FOR_TARGET -fPIC $cflags" $srcdir/$subdir/pr11218-1.c tmpdir/pr11218-1.o ld_link $ld tmpdir/pr11218-1.so "-shared tmpdir/pr11218-1.o" diff --git a/ld/testsuite/ld-pie/pie.exp b/ld/testsuite/ld-pie/pie.exp index 8989009..fc4884e 100644 --- a/ld/testsuite/ld-pie/pie.exp +++ b/ld/testsuite/ld-pie/pie.exp @@ -19,9 +19,7 @@ # MA 02110-1301, USA. # -if { ![istarget *-*-linux*] - && ![istarget *-*-nacl*] - && ![istarget *-*-gnu*] } { +if { ![istarget *-*-linux*] && ![istarget *-*-gnu*] } { return } diff --git a/ld/testsuite/ld-plugin/lto-binutils.exp b/ld/testsuite/ld-plugin/lto-binutils.exp index 5b4e0a1..88d3517 100644 --- a/ld/testsuite/ld-plugin/lto-binutils.exp +++ b/ld/testsuite/ld-plugin/lto-binutils.exp @@ -23,7 +23,6 @@ if { !([istarget *-*-linux*] || [istarget arm*-*-uclinuxfdpiceabi] - || [istarget *-*-nacl*] || [istarget *-*-gnu*]) || [istarget *ecoff] } then { return } diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp index d68e5f4..9ac3cf6 100644 --- a/ld/testsuite/ld-plugin/lto.exp +++ b/ld/testsuite/ld-plugin/lto.exp @@ -1009,7 +1009,7 @@ run_cc_link_tests [list \ set board_flags [get_board_flags] set exec_output [run_host_cmd "sh" \ - "-c \"ulimit -n 20; \ + "-c \"ulimit -n 25; \ $CC_FOR_TARGET $gcc_B_opt $CFLAGS_FOR_TARGET \ $board_flags $ld_L_opt -o tmpdir/pr28138 \ tmpdir/pr28138.o tmpdir/pr28138.a\""] diff --git a/ld/testsuite/ld-powerpc/elfv2-2so.d b/ld/testsuite/ld-powerpc/elfv2-2so.d index 56b1434..18bc87f 100644 --- a/ld/testsuite/ld-powerpc/elfv2-2so.d +++ b/ld/testsuite/ld-powerpc/elfv2-2so.d @@ -2,4 +2,4 @@ #source: elfv2-2b.s #as: -a64 #ld: -melf64ppc -shared -e f1 -#error: .* R_PPC64_ADDR64_LOCAL reloc unsupported in shared libraries and PIEs.* +#error: .* R_PPC64_ADDR64_LOCAL unsupported in shared libraries and PIEs.* diff --git a/ld/testsuite/ld-riscv-elf/discard-exe.d b/ld/testsuite/ld-riscv-elf/discard-exe.d new file mode 100644 index 0000000..7bdb16b1 --- /dev/null +++ b/ld/testsuite/ld-riscv-elf/discard-exe.d @@ -0,0 +1,6 @@ +#source: discard.s +#as: +#ld: -Tdiscard.ld +#readelf: -rW + +There are no relocations in this file. diff --git a/ld/testsuite/ld-riscv-elf/discard-pic.d b/ld/testsuite/ld-riscv-elf/discard-pic.d new file mode 100644 index 0000000..9ac2cc6 --- /dev/null +++ b/ld/testsuite/ld-riscv-elf/discard-pic.d @@ -0,0 +1,9 @@ +#source: discard.s +#as: +#ld: -shared -Tdiscard.ld +#readelf: -rW + +Relocation section '\.rela\.dyn'.* +[ ]+Offset[ ]+Info[ ]+Type.* +0+0[ ]+0+0[ ]+R_RISCV_NONE[ ]+0 +0+(20008|20010)[ ]+[0-9a-f]+[ ]+R_RISCV_(32|64)[ ]+0+10008[ ]+sym_global \+ 0 diff --git a/ld/testsuite/ld-riscv-elf/discard-pie.d b/ld/testsuite/ld-riscv-elf/discard-pie.d new file mode 100644 index 0000000..cb95c4a --- /dev/null +++ b/ld/testsuite/ld-riscv-elf/discard-pie.d @@ -0,0 +1,9 @@ +#source: discard.s +#as: +#ld: -pie -Tdiscard.ld +#readelf: -rW + +Relocation section '\.rela\.dyn'.* +[ ]+Offset[ ]+Info[ ]+Type.* +0+0[ ]+0+0[ ]+R_RISCV_NONE[ ]+0 +0+0[ ]+0+0[ ]+R_RISCV_NONE[ ]+0 diff --git a/ld/testsuite/ld-riscv-elf/discard.ld b/ld/testsuite/ld-riscv-elf/discard.ld new file mode 100644 index 0000000..3afed21 --- /dev/null +++ b/ld/testsuite/ld-riscv-elf/discard.ld @@ -0,0 +1,13 @@ +OUTPUT_ARCH(riscv) +ENTRY(_start) +SECTIONS +{ + /DISCARD/ : { *(.discard.*) } + + . = 0x10000; + .text : { *(.text) } + . = 0x20000; + .got : { *(.got) *(.got.plt)} + . = 0x30000; + .data : { *(.data) *(.data.*) } +} diff --git a/ld/testsuite/ld-riscv-elf/discard.s b/ld/testsuite/ld-riscv-elf/discard.s new file mode 100644 index 0000000..f03ea2b --- /dev/null +++ b/ld/testsuite/ld-riscv-elf/discard.s @@ -0,0 +1,65 @@ +.text +.option pic +.option norvc +.p2align 3 +.global _start +_start: + nop + +sym_local: + nop + +.global sym_global +sym_global: + nop + +.global sym_hidden +.hidden sym_hidden +sym_hidden: + nop + +.global sym_global_abs +.set sym_global_abs, 42 + +.global sym_weak_undef +.weak sym_weak_undef + +# Got + +.section .discard.got_local, "ax" + la x1, sym_local + +.section .discard.got_global, "ax" + la x1, sym_global + +# Data + +.section .discard.local,"a" +.p2align 1 +discard_local: +.quad sym_local + +.section .discard.global,"a" +.p2align 1 +discard_global: +.quad sym_global + +.section .discard.hidden,"a" +.p2align 1 +discard_hidden: +.quad sym_hidden + +.section .discard.global_abs,"a" +.p2align 1 +discard_global_abs: +.quad sym_global_abs + +.section .discard.weak_undef,"a" +.p2align 1 +discard_weak_undef: +.quad sym_weak_undef + +.section .discard._DYNAMIC,"a" +.p2align 1 +discard_DYNAMIC: +.quad _DYNAMIC diff --git a/ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp b/ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp index 70c9aa7..bae1105 100644 --- a/ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp +++ b/ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp @@ -238,6 +238,10 @@ if [istarget "riscv*-*-*"] { run_dump_test "pie-bind-locally-rv32" run_dump_test "pie-bind-locally-rv64" + run_dump_test "discard-exe" + run_dump_test "discard-pie" + run_dump_test "discard-pic" + # IFUNC testcases. # Check IFUNC by single type relocs. run_dump_test_ifunc "ifunc-reloc-call-01" rv32 exe diff --git a/ld/testsuite/ld-scripts/rgn-at3.d b/ld/testsuite/ld-scripts/rgn-at3.d index b0ea08a..1d21956 100644 --- a/ld/testsuite/ld-scripts/rgn-at3.d +++ b/ld/testsuite/ld-scripts/rgn-at3.d @@ -2,13 +2,9 @@ # source: rgn-at.s # ld: -T rgn-at3.t # objdump: -w -h -# xfail: rx-*-* *-*-nacl* +# xfail: rx-*-* # FAILS on the RX because the linker has to set LMA == VMA for the # Renesas loader. -# FAILs on NaCl targets because the linker extends the first segment -# to fill out the page, making its p_vaddr+p_memsz cover the sh_addr -# of .bss too, which makes BFD compute its LMA from the p_paddr of the -# text segment. .*: file format .* diff --git a/ld/testsuite/ld-shared/shared.exp b/ld/testsuite/ld-shared/shared.exp index a8ddac2..29de93a 100644 --- a/ld/testsuite/ld-shared/shared.exp +++ b/ld/testsuite/ld-shared/shared.exp @@ -42,7 +42,6 @@ if { ![istarget hppa*64*-*-hpux*] \ && ![istarget i?86-*-elf*] \ && ![istarget i?86-*-linux*] \ && ![istarget i?86-*-gnu*] \ - && ![istarget *-*-nacl*] \ && ![istarget ia64-*-elf*] \ && ![istarget ia64-*-linux*] \ && ![istarget m68k-*-linux*] \ diff --git a/ld/testsuite/ld-size/size.exp b/ld/testsuite/ld-size/size.exp index 776341b..ae24f3b 100644 --- a/ld/testsuite/ld-size/size.exp +++ b/ld/testsuite/ld-size/size.exp @@ -26,7 +26,6 @@ if {!(([istarget "i?86-*-*"] || [istarget "x86_64-*-*"]) && ([istarget "*-*-elf*"] - || [istarget "*-*-nacl*"] || [istarget "*-*-linux*"] || [istarget "*-*-gnu*"])) } { verbose "Size relocations tests not run - no target support" @@ -39,13 +38,6 @@ if { ![check_shared_lib_support] } { return } -# So as to avoid rewriting every last test case here in a nacl variant, -# we use black magic to massage the generic cases into nacl-variant cases. -if [istarget "*-*-nacl*"] { - # Change all the -melf_i386 to -melf_i386_nacl so linking can succeed. - set options_regsub(ld) {-m(\\S+) -m\\1_nacl} -} - set test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]] foreach t $test_list { # We need to strip the ".d", but can leave the dirname. diff --git a/ld/testsuite/ld-vsb/vsb.exp b/ld/testsuite/ld-vsb/vsb.exp index e44ac39..84ae1ed 100644 --- a/ld/testsuite/ld-vsb/vsb.exp +++ b/ld/testsuite/ld-vsb/vsb.exp @@ -36,7 +36,6 @@ if { ![istarget hppa*64*-*-hpux*] \ && ![istarget hppa*-*-linux*] \ && ![istarget i?86-*-linux*] \ && ![istarget i?86-*-gnu*] \ - && ![istarget *-*-nacl*] \ && ![istarget ia64-*-linux*] \ && ![istarget m68k-*-linux*] \ && ![istarget mips*-*-linux*] \ @@ -114,7 +113,6 @@ if [istarget arm*-*-linux*] { set support_protected "no" if { [istarget *-*-linux*] - || [istarget *-*-nacl*] || [istarget *-*-gnu*] } { if [ld_compile "$CC_FOR_TARGET -g -DPROTECTED_CHECK" $srcdir/$subdir/main.c $tmpdir/main.o] { if [ld_link $CC_FOR_TARGET $tmpdir/main "$tmpdir/main.o"] { |