x86-64.exp: Add -z noseparate-code -z max-page-size=0x200000
Add -z noseparate-code -z max-page-size=0x200000 since these tests check for exact addresses and don't expect extra PT_LOAD segment. But don't add them to nacl targets since they generate different addresses. * testsuite/ld-x86-64/x86-64.exp: Add -z noseparate-code -z max-page-size=0x200000, excluding NaCl target.
This commit is contained in:
parent
c9d3eb5f61
commit
7c9f387aef
|
@ -1,3 +1,8 @@
|
||||||
|
2018-02-16 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
* testsuite/ld-x86-64/x86-64.exp: Add -z noseparate-code
|
||||||
|
-z max-page-size=0x200000, excluding NaCl target.
|
||||||
|
|
||||||
2018-02-16 H.J. Lu <hongjiu.lu@intel.com>
|
2018-02-16 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
* testsuite/ld-ifunc/ifunc-2-i386-now.d: Likewise.
|
* testsuite/ld-ifunc/ifunc-2-i386-now.d: Likewise.
|
||||||
|
|
|
@ -50,20 +50,23 @@ set x86_64tests {
|
||||||
"-melf_x86_64 tmpdir/libpltlib.so" "" "--64" {plt.s}
|
"-melf_x86_64 tmpdir/libpltlib.so" "" "--64" {plt.s}
|
||||||
{{objdump -drj.plt plt.pd}} "plt"}
|
{{objdump -drj.plt plt.pd}} "plt"}
|
||||||
{"TLS -fpic -shared transitions"
|
{"TLS -fpic -shared transitions"
|
||||||
"-shared -melf_x86_64 --no-ld-generated-unwind-info --hash-style=sysv" ""
|
"-shared -melf_x86_64 --no-ld-generated-unwind-info \
|
||||||
|
-z noseparate-code -z max-page-size=0x200000 --hash-style=sysv" ""
|
||||||
"--64" {tlspic1.s tlspic2.s}
|
"--64" {tlspic1.s tlspic2.s}
|
||||||
{{readelf -WSsrl tlspic.rd} {objdump -drj.text\ -Mintel64 tlspic.dd}
|
{{readelf -WSsrl tlspic.rd} {objdump -drj.text\ -Mintel64 tlspic.dd}
|
||||||
{objdump -sj.got tlspic.sd} {objdump -sj.tdata tlspic.td}}
|
{objdump -sj.got tlspic.sd} {objdump -sj.tdata tlspic.td}}
|
||||||
"libtlspic.so"}
|
"libtlspic.so"}
|
||||||
{"TLS -fpic -shared transitions with r15 as GOT base"
|
{"TLS -fpic -shared transitions with r15 as GOT base"
|
||||||
"-shared -melf_x86_64 --no-ld-generated-unwind-info --hash-style=sysv" ""
|
"-shared -melf_x86_64 --no-ld-generated-unwind-info \
|
||||||
|
-z noseparate-code -z max-page-size=0x200000 --hash-style=sysv" ""
|
||||||
"--64 -mrelax-relocations=yes"
|
"--64 -mrelax-relocations=yes"
|
||||||
{tlspic3.s tlspic2.s}
|
{tlspic3.s tlspic2.s}
|
||||||
{{readelf -WSsrl tlspic2.rd} {objdump -drj.text\ -Mintel64 tlspic2.dd}
|
{{readelf -WSsrl tlspic2.rd} {objdump -drj.text\ -Mintel64 tlspic2.dd}
|
||||||
{objdump -sj.got tlspic2.sd} {objdump -sj.tdata tlspic2.td}}
|
{objdump -sj.got tlspic2.sd} {objdump -sj.tdata tlspic2.td}}
|
||||||
"libtlspic2.so"}
|
"libtlspic2.so"}
|
||||||
{"TLS descriptor -fpic -shared transitions"
|
{"TLS descriptor -fpic -shared transitions"
|
||||||
"-shared -melf_x86_64 --no-ld-generated-unwind-info --hash-style=sysv" ""
|
"-shared -melf_x86_64 --no-ld-generated-unwind-info \
|
||||||
|
-z noseparate-code -z max-page-size=0x200000 --hash-style=sysv" ""
|
||||||
"--64" {tlsdesc.s tlspic2.s}
|
"--64" {tlsdesc.s tlspic2.s}
|
||||||
{{readelf -WSsrld tlsdesc.rd} {objdump -drj.text tlsdesc.dd}
|
{{readelf -WSsrld tlsdesc.rd} {objdump -drj.text tlsdesc.dd}
|
||||||
{objdump "-s -j.got -j.got.plt" tlsdesc.sd} {objdump -sj.tdata tlsdesc.td}
|
{objdump "-s -j.got -j.got.plt" tlsdesc.sd} {objdump -sj.tdata tlsdesc.td}
|
||||||
|
@ -71,25 +74,29 @@ set x86_64tests {
|
||||||
{"Helper shared library" "-shared -melf_x86_64" ""
|
{"Helper shared library" "-shared -melf_x86_64" ""
|
||||||
"--64" {tlslib.s} {} "libtlslib.so"}
|
"--64" {tlslib.s} {} "libtlslib.so"}
|
||||||
{"TLS -fpic and -fno-pic exec transitions"
|
{"TLS -fpic and -fno-pic exec transitions"
|
||||||
"-melf_x86_64 tmpdir/libtlslib.so --no-ld-generated-unwind-info --hash-style=sysv" ""
|
"-melf_x86_64 tmpdir/libtlslib.so --no-ld-generated-unwind-info \
|
||||||
|
-z noseparate-code -z max-page-size=0x200000 --hash-style=sysv" ""
|
||||||
"--64" {tlsbinpic.s tlsbin.s}
|
"--64" {tlsbinpic.s tlsbin.s}
|
||||||
{{readelf -WSsrl tlsbin.rd} {objdump -drj.text tlsbin.dd}
|
{{readelf -WSsrl tlsbin.rd} {objdump -drj.text tlsbin.dd}
|
||||||
{objdump -sj.got tlsbin.sd} {objdump -sj.tdata tlsbin.td}}
|
{objdump -sj.got tlsbin.sd} {objdump -sj.tdata tlsbin.td}}
|
||||||
"tlsbin"}
|
"tlsbin"}
|
||||||
{"TLS -fpic and -fno-pic exec transitions without PLT"
|
{"TLS -fpic and -fno-pic exec transitions without PLT"
|
||||||
"-melf_x86_64 tmpdir/libtlslib.so --no-ld-generated-unwind-info --hash-style=sysv" ""
|
"-melf_x86_64 tmpdir/libtlslib.so --no-ld-generated-unwind-info \
|
||||||
|
-z noseparate-code -z max-page-size=0x200000 --hash-style=sysv" ""
|
||||||
"-mrelax-relocations=yes --64" {tlsbinpic2.s tlsbin.s}
|
"-mrelax-relocations=yes --64" {tlsbinpic2.s tlsbin.s}
|
||||||
{{readelf -WSsrl tlsbin2.rd} {objdump -drj.text tlsbin2.dd}
|
{{readelf -WSsrl tlsbin2.rd} {objdump -drj.text tlsbin2.dd}
|
||||||
{objdump -sj.got tlsbin2.sd} {objdump -sj.tdata tlsbin2.td}}
|
{objdump -sj.got tlsbin2.sd} {objdump -sj.tdata tlsbin2.td}}
|
||||||
"tlsbin2"}
|
"tlsbin2"}
|
||||||
{"TLS descriptor -fpic and -fno-pic exec transitions"
|
{"TLS descriptor -fpic and -fno-pic exec transitions"
|
||||||
"-melf_x86_64 tmpdir/libtlslib.so --no-ld-generated-unwind-info --hash-style=sysv" ""
|
"-melf_x86_64 tmpdir/libtlslib.so --no-ld-generated-unwind-info \
|
||||||
|
-z noseparate-code -z max-page-size=0x200000 --hash-style=sysv" ""
|
||||||
"--64" {tlsbindesc.s tlsbin.s}
|
"--64" {tlsbindesc.s tlsbin.s}
|
||||||
{{readelf -WSsrl tlsbindesc.rd} {objdump -drj.text tlsbindesc.dd}
|
{{readelf -WSsrl tlsbindesc.rd} {objdump -drj.text tlsbindesc.dd}
|
||||||
{objdump -sj.got tlsbindesc.sd} {objdump -sj.tdata tlsbindesc.td}}
|
{objdump -sj.got tlsbindesc.sd} {objdump -sj.tdata tlsbindesc.td}}
|
||||||
"tlsbindesc"}
|
"tlsbindesc"}
|
||||||
{"TLS with global dynamic and descriptors"
|
{"TLS with global dynamic and descriptors"
|
||||||
"-shared -melf_x86_64 --no-ld-generated-unwind-info --hash-style=sysv" ""
|
"-shared -melf_x86_64 --no-ld-generated-unwind-info \
|
||||||
|
-z noseparate-code -z max-page-size=0x200000 --hash-style=sysv" ""
|
||||||
"--64" {tlsgdesc.s}
|
"--64" {tlsgdesc.s}
|
||||||
{{readelf -WSsrl tlsgdesc.rd} {objdump -drj.text\ -Mintel64 tlsgdesc.dd}}
|
{{readelf -WSsrl tlsgdesc.rd} {objdump -drj.text\ -Mintel64 tlsgdesc.dd}}
|
||||||
"libtlsgdesc.so"}
|
"libtlsgdesc.so"}
|
||||||
|
@ -226,6 +233,13 @@ if [istarget "*-*-nacl*"] {
|
||||||
# Change all the -melf_x86_64 to -melf_x86_64_nacl so linking can succeed.
|
# Change all the -melf_x86_64 to -melf_x86_64_nacl so linking can succeed.
|
||||||
regsub -all -- $lhs $x86_64tests $rhs x86_64tests
|
regsub -all -- $lhs $x86_64tests $rhs x86_64tests
|
||||||
|
|
||||||
|
set zlhs {-z noseparate-code -z max-page-size=0x200000}
|
||||||
|
set zrhs {}
|
||||||
|
|
||||||
|
# Remove -z max-page-size=0x200000 -z noseparate-code since they
|
||||||
|
# generate different addresses for nacl targets.
|
||||||
|
regsub -all -- $zlhs $x86_64tests $zrhs x86_64tests
|
||||||
|
|
||||||
# Same, applied to all the run_dump_test cases.
|
# Same, applied to all the run_dump_test cases.
|
||||||
set options_regsub(ld) [list $lhs $rhs]
|
set options_regsub(ld) [list $lhs $rhs]
|
||||||
|
|
||||||
|
@ -1605,7 +1619,8 @@ if { [isnative] && [which $CC] != 0 } {
|
||||||
[list \
|
[list \
|
||||||
"Build plt-main with -z bndplt" \
|
"Build plt-main with -z bndplt" \
|
||||||
"tmpdir/plt-main1.o tmpdir/plt-main2.o tmpdir/plt-main3.o \
|
"tmpdir/plt-main1.o tmpdir/plt-main2.o tmpdir/plt-main3.o \
|
||||||
tmpdir/plt-main4.o tmpdir/libplt-lib.so -z bndplt" \
|
tmpdir/plt-main4.o tmpdir/libplt-lib.so -z bndplt \
|
||||||
|
-z noseparate-code -z max-page-size=0x200000" \
|
||||||
"" \
|
"" \
|
||||||
{ plt-main5.c } \
|
{ plt-main5.c } \
|
||||||
{{objdump {-drw} plt-main-bnd.dd}} \
|
{{objdump {-drw} plt-main-bnd.dd}} \
|
||||||
|
@ -1614,7 +1629,8 @@ if { [isnative] && [which $CC] != 0 } {
|
||||||
[list \
|
[list \
|
||||||
"Build plt-main with PIE and -z bndplt" \
|
"Build plt-main with PIE and -z bndplt" \
|
||||||
"tmpdir/plt-main1.o tmpdir/plt-main2.o tmpdir/plt-main3.o \
|
"tmpdir/plt-main1.o tmpdir/plt-main2.o tmpdir/plt-main3.o \
|
||||||
tmpdir/plt-main4.o tmpdir/libplt-lib.so -z bndplt -pie" \
|
tmpdir/plt-main4.o tmpdir/libplt-lib.so -z bndplt -pie \
|
||||||
|
-z noseparate-code -z max-page-size=0x200000" \
|
||||||
"-fPIC" \
|
"-fPIC" \
|
||||||
{ plt-main5.c } \
|
{ plt-main5.c } \
|
||||||
{{objdump {-drw} plt-main-bnd.dd}} \
|
{{objdump {-drw} plt-main-bnd.dd}} \
|
||||||
|
@ -1623,7 +1639,8 @@ if { [isnative] && [which $CC] != 0 } {
|
||||||
[list \
|
[list \
|
||||||
"Build plt-main with -z bndplt -z now" \
|
"Build plt-main with -z bndplt -z now" \
|
||||||
"tmpdir/plt-main1.o tmpdir/plt-main2.o tmpdir/plt-main3.o \
|
"tmpdir/plt-main1.o tmpdir/plt-main2.o tmpdir/plt-main3.o \
|
||||||
tmpdir/plt-main4.o tmpdir/libplt-lib.so -z bndplt -z now" \
|
tmpdir/plt-main4.o tmpdir/libplt-lib.so -z bndplt -z now \
|
||||||
|
-z noseparate-code -z max-page-size=0x200000" \
|
||||||
"" \
|
"" \
|
||||||
{ plt-main5.c } \
|
{ plt-main5.c } \
|
||||||
{{readelf {-SW} plt-main-bnd-now.rd} {objdump {-drw} plt-main-bnd.dd}} \
|
{{readelf {-SW} plt-main-bnd-now.rd} {objdump {-drw} plt-main-bnd.dd}} \
|
||||||
|
@ -1632,7 +1649,8 @@ if { [isnative] && [which $CC] != 0 } {
|
||||||
[list \
|
[list \
|
||||||
"Build plt-main with PIE and -z bndplt -z now" \
|
"Build plt-main with PIE and -z bndplt -z now" \
|
||||||
"tmpdir/plt-main1.o tmpdir/plt-main2.o tmpdir/plt-main3.o \
|
"tmpdir/plt-main1.o tmpdir/plt-main2.o tmpdir/plt-main3.o \
|
||||||
tmpdir/plt-main4.o tmpdir/libplt-lib.so -z bndplt -z now -pie" \
|
tmpdir/plt-main4.o tmpdir/libplt-lib.so -z bndplt -z now -pie \
|
||||||
|
-z noseparate-code -z max-page-size=0x200000" \
|
||||||
"-fPIC" \
|
"-fPIC" \
|
||||||
{ plt-main5.c } \
|
{ plt-main5.c } \
|
||||||
{{readelf {-SW} plt-main-bnd-now.rd} {objdump {-drw} plt-main-bnd.dd}} \
|
{{readelf {-SW} plt-main-bnd-now.rd} {objdump {-drw} plt-main-bnd.dd}} \
|
||||||
|
@ -1728,7 +1746,8 @@ if { [isnative] && [which $CC] != 0 } {
|
||||||
[list \
|
[list \
|
||||||
"Build plt-main with -z ibtplt" \
|
"Build plt-main with -z ibtplt" \
|
||||||
"tmpdir/plt-main1.o tmpdir/plt-main2.o tmpdir/plt-main3.o \
|
"tmpdir/plt-main1.o tmpdir/plt-main2.o tmpdir/plt-main3.o \
|
||||||
tmpdir/plt-main4.o tmpdir/libplt-lib.so -z ibtplt" \
|
tmpdir/plt-main4.o tmpdir/libplt-lib.so -z ibtplt \
|
||||||
|
-z noseparate-code -z max-page-size=0x200000" \
|
||||||
"" \
|
"" \
|
||||||
{ plt-main5.c } \
|
{ plt-main5.c } \
|
||||||
$pltdump \
|
$pltdump \
|
||||||
|
@ -1737,7 +1756,8 @@ if { [isnative] && [which $CC] != 0 } {
|
||||||
[list \
|
[list \
|
||||||
"Build plt-main with PIE and -z ibtplt" \
|
"Build plt-main with PIE and -z ibtplt" \
|
||||||
"tmpdir/plt-main1.o tmpdir/plt-main2.o tmpdir/plt-main3.o \
|
"tmpdir/plt-main1.o tmpdir/plt-main2.o tmpdir/plt-main3.o \
|
||||||
tmpdir/plt-main4.o tmpdir/libplt-lib.so -z ibtplt -pie" \
|
tmpdir/plt-main4.o tmpdir/libplt-lib.so -z ibtplt -pie \
|
||||||
|
-z noseparate-code -z max-page-size=0x200000" \
|
||||||
"-fPIC" \
|
"-fPIC" \
|
||||||
{ plt-main5.c } \
|
{ plt-main5.c } \
|
||||||
$pltdump \
|
$pltdump \
|
||||||
|
@ -1746,7 +1766,8 @@ if { [isnative] && [which $CC] != 0 } {
|
||||||
[list \
|
[list \
|
||||||
"Build plt-main with -z ibtplt -z now" \
|
"Build plt-main with -z ibtplt -z now" \
|
||||||
"tmpdir/plt-main1.o tmpdir/plt-main2.o tmpdir/plt-main3.o \
|
"tmpdir/plt-main1.o tmpdir/plt-main2.o tmpdir/plt-main3.o \
|
||||||
tmpdir/plt-main4.o tmpdir/libplt-lib.so -z ibtplt -z now" \
|
tmpdir/plt-main4.o tmpdir/libplt-lib.so -z ibtplt -z now \
|
||||||
|
-z noseparate-code -z max-page-size=0x200000" \
|
||||||
"" \
|
"" \
|
||||||
{ plt-main5.c } \
|
{ plt-main5.c } \
|
||||||
$pltsecdump \
|
$pltsecdump \
|
||||||
|
@ -1755,7 +1776,8 @@ if { [isnative] && [which $CC] != 0 } {
|
||||||
[list \
|
[list \
|
||||||
"Build plt-main with PIE and -z ibtplt -z now" \
|
"Build plt-main with PIE and -z ibtplt -z now" \
|
||||||
"tmpdir/plt-main1.o tmpdir/plt-main2.o tmpdir/plt-main3.o \
|
"tmpdir/plt-main1.o tmpdir/plt-main2.o tmpdir/plt-main3.o \
|
||||||
tmpdir/plt-main4.o tmpdir/libplt-lib.so -z ibtplt -z now -pie" \
|
tmpdir/plt-main4.o tmpdir/libplt-lib.so -z ibtplt -z now -pie \
|
||||||
|
-z noseparate-code -z max-page-size=0x200000" \
|
||||||
"-fPIC" \
|
"-fPIC" \
|
||||||
{ plt-main5.c } \
|
{ plt-main5.c } \
|
||||||
$pltsecdump \
|
$pltsecdump \
|
||||||
|
@ -1763,7 +1785,8 @@ if { [isnative] && [which $CC] != 0 } {
|
||||||
] \
|
] \
|
||||||
[list \
|
[list \
|
||||||
"Build libibtplt-lib.so with -z ibtplt" \
|
"Build libibtplt-lib.so with -z ibtplt" \
|
||||||
"-shared -z ibtplt" \
|
"-shared -z ibtplt \
|
||||||
|
-z noseparate-code -z max-page-size=0x200000" \
|
||||||
"-fPIC" \
|
"-fPIC" \
|
||||||
{ plt-main1.c plt-main2.c plt-main3.c plt-main4.c} \
|
{ plt-main1.c plt-main2.c plt-main3.c plt-main4.c} \
|
||||||
$pltdump \
|
$pltdump \
|
||||||
|
@ -1771,7 +1794,8 @@ if { [isnative] && [which $CC] != 0 } {
|
||||||
] \
|
] \
|
||||||
[list \
|
[list \
|
||||||
"Build libibtplt--now-lib.so with -z ibtplt -z now" \
|
"Build libibtplt--now-lib.so with -z ibtplt -z now" \
|
||||||
"-shared -z ibtplt -z now" \
|
"-shared -z ibtplt -z now \
|
||||||
|
-z noseparate-code -z max-page-size=0x200000" \
|
||||||
"-fPIC" \
|
"-fPIC" \
|
||||||
{ plt-main1.c plt-main2.c plt-main3.c plt-main4.c} \
|
{ plt-main1.c plt-main2.c plt-main3.c plt-main4.c} \
|
||||||
$pltdump \
|
$pltdump \
|
||||||
|
@ -1880,7 +1904,8 @@ if { ![istarget "x86_64-*-linux*"]} {
|
||||||
run_ld_link_tests [list \
|
run_ld_link_tests [list \
|
||||||
[list \
|
[list \
|
||||||
"basic PLT generation (-z now)" \
|
"basic PLT generation (-z now)" \
|
||||||
"-z now -melf_x86_64 --hash-style=sysv tmpdir/libpltlib.so" \
|
"-z now -melf_x86_64 --hash-style=sysv tmpdir/libpltlib.so \
|
||||||
|
-z noseparate-code -z max-page-size=0x200000" \
|
||||||
"" \
|
"" \
|
||||||
"--64" \
|
"--64" \
|
||||||
{plt2.s} \
|
{plt2.s} \
|
||||||
|
|
Loading…
Reference in New Issue