i386.exp: Add -z noseparate-code
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 16 Feb 2018 16:56:25 +0000 (08:56 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 16 Feb 2018 16:56:43 +0000 (08:56 -0800)
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
ld/testsuite/ld-i386/i386.exp

index 0e6c4bd1aa463b6cd797c13b54cad11fcf5a1fe6..f6fda3035d2776be3107a3912c6c3aea90dad829 100644 (file)
@@ -1,3 +1,7 @@
+2018-02-16  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * testsuite/ld-i386/i386.exp: Add -z noseparate-code.
+
 2018-02-16  H.J. Lu  <hongjiu.lu@intel.com>
 
        * testsuite/ld-elf/pr19162.d: Add -z noseparate-code.
index ba2cce87ecec29deb7de830dc1dcc36fc358f9a0..240850a02c6d0393e00079e424250a724f4796fd 100644 (file)
@@ -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} \