From 760b28930013fc479fece0007b3db79ade49155c Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 16 Feb 2018 08:56:25 -0800 Subject: [PATCH] i386.exp: Add -z noseparate-code These tests fail due to one extra PT_LOAD segment with -z separate-code. * testsuite/ld-i386/i386.exp: Add -z noseparate-code. --- ld/ChangeLog | 4 ++++ ld/testsuite/ld-i386/i386.exp | 27 ++++++++++++++++++--------- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index 0e6c4bd1aa4..f6fda3035d2 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,7 @@ +2018-02-16 H.J. Lu + + * testsuite/ld-i386/i386.exp: Add -z noseparate-code. + 2018-02-16 H.J. Lu * testsuite/ld-elf/pr19162.d: Add -z noseparate-code. diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp index ba2cce87ece..240850a02c6 100644 --- a/ld/testsuite/ld-i386/i386.exp +++ b/ld/testsuite/ld-i386/i386.exp @@ -129,20 +129,23 @@ set i386tests { "-shared -melf_i386 tmpdir/libpltlib.so" "" "--32" {plt-pic.s} {{objdump -drj.plt plt-pic.pd}} "libplt-pic.so"} {"TLS -fpic -shared transitions" - "-shared -melf_i386 --no-ld-generated-unwind-info --hash-style=sysv" "" + "-shared -melf_i386 --no-ld-generated-unwind-info \ + -z noseparate-code --hash-style=sysv" "" "--32" {tlspic1.s tlspic2.s} {{readelf -Ssrl tlspic.rd} {objdump -drj.text tlspic.dd} {objdump -sj.got tlspic.sd} {objdump -sj.tdata tlspic.td}} "libtlspic.so"} {"TLS -fpic -shared transitions without PLT" - "-shared -melf_i386 --no-ld-generated-unwind-info --hash-style=sysv" "" + "-shared -melf_i386 --no-ld-generated-unwind-info \ + -z noseparate-code --hash-style=sysv" "" "-mrelax-relocations=yes --32" {tlspic3.s tlspic2.s} {{readelf -Ssrl tlspic2.rd} {objdump -drj.text tlspic2.dd} {objdump -sj.got tlspic2.sd} {objdump -sj.tdata tlspic2.td}} "libtlspic2.so"} {"TLS descriptor -fpic -shared transitions" - "-shared -melf_i386 --no-ld-generated-unwind-info --hash-style=sysv" "" + "-shared -melf_i386 --no-ld-generated-unwind-info \ + -z noseparate-code --hash-style=sysv" "" "--32" {tlsdesc.s tlspic2.s} {{readelf -Ssrl tlsdesc.rd} {objdump -drj.text tlsdesc.dd} {objdump "-s -j.got -j.got.plt" tlsdesc.sd} {objdump -sj.tdata tlsdesc.td}} @@ -150,31 +153,36 @@ set i386tests { {"Helper shared library" "-shared -melf_i386" "" "--32" {tlslib.s} {} "libtlslib.so"} {"TLS -fpic and -fno-pic exec transitions" - "-melf_i386 tmpdir/libtlslib.so --no-ld-generated-unwind-info --hash-style=sysv" "" + "-melf_i386 tmpdir/libtlslib.so --no-ld-generated-unwind-info \ + -z noseparate-code --hash-style=sysv" "" "--32" {tlsbinpic.s tlsbin.s} {{readelf -Ssrl tlsbin.rd} {objdump -drj.text tlsbin.dd} {objdump -sj.got tlsbin.sd} {objdump -sj.tdata tlsbin.td}} "tlsbin"} {"TLS -fpic and -fno-pic exec transitions without PLT" - "-melf_i386 tmpdir/libtlslib.so --no-ld-generated-unwind-info --hash-style=sysv" "" + "-melf_i386 tmpdir/libtlslib.so --no-ld-generated-unwind-info \ + -z noseparate-code --hash-style=sysv" "" "-mrelax-relocations=yes --32" {tlsbinpic2.s tlsbin.s} {{readelf -Ssrl tlsbin2.rd} {objdump -drj.text tlsbin2.dd} {objdump -sj.got tlsbin2.sd} {objdump -sj.tdata tlsbin2.td}} "tlsbin2"} {"TLS descriptor -fpic and -fno-pic exec transitions" - "-melf_i386 tmpdir/libtlslib.so --no-ld-generated-unwind-info --hash-style=sysv" "" + "-melf_i386 tmpdir/libtlslib.so --no-ld-generated-unwind-info \ + -z noseparate-code --hash-style=sysv" "" "--32" {tlsbindesc.s tlsbin.s} {{readelf -Ssrl tlsbindesc.rd} {objdump -drj.text tlsbindesc.dd} {objdump -sj.got tlsbindesc.sd} {objdump -sj.tdata tlsbindesc.td}} "tlsbindesc"} {"TLS -fno-pic -shared" - "-shared -melf_i386 --no-ld-generated-unwind-info --hash-style=sysv" "" + "-shared -melf_i386 --no-ld-generated-unwind-info \ + -z noseparate-code --hash-style=sysv" "" "--32" {tlsnopic1.s tlsnopic2.s} {{readelf -Ssrl tlsnopic.rd} {objdump -drj.text tlsnopic.dd} {objdump -sj.got tlsnopic.sd}} "libtlsnopic.so"} {"TLS with global dynamic and descriptors" - "-shared -melf_i386 --no-ld-generated-unwind-info --hash-style=sysv" "" + "-shared -melf_i386 --no-ld-generated-unwind-info \ + -z noseparate-code --hash-style=sysv" "" "--32" {tlsgdesc.s} {{readelf -Ssrl tlsgdesc.rd} {objdump -drj.text tlsgdesc.dd}} "libtlsgdesc.so"} @@ -1412,7 +1420,8 @@ if { !([istarget "i?86-*-linux*"] run_ld_link_tests [list \ [list \ "basic PLT generation (non-PIC, -z now)" \ - "-z now -melf_i386 --hash-style=sysv tmpdir/libpltlib.so" \ + "-z now -melf_i386 --hash-style=sysv \ + -z noseparate-code tmpdir/libpltlib.so" \ "" \ "--32" \ {plt2.s} \ -- 2.30.2