x86-64: Add tests for -z separate-code -z max-page-size=0x1000
PR ld/22393 * testsuite/ld-x86-64/pr22393-3a.c: New file. * testsuite/ld-x86-64/pr22393-3a.rd: Likewise. * testsuite/ld-x86-64/pr22393-3b.c: Likewise. * testsuite/ld-x86-64/pr22393-3b.rd: Likewise. * testsuite/ld-x86-64/x86-64.exp: Run tests for -z separate-code -z max-page-size=0x1000.
This commit is contained in:
parent
d346bb277c
commit
cf9e7f1f07
10
ld/ChangeLog
10
ld/ChangeLog
@ -1,3 +1,13 @@
|
||||
2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR ld/22393
|
||||
* testsuite/ld-x86-64/pr22393-3a.c: New file.
|
||||
* testsuite/ld-x86-64/pr22393-3a.rd: Likewise.
|
||||
* testsuite/ld-x86-64/pr22393-3b.c: Likewise.
|
||||
* testsuite/ld-x86-64/pr22393-3b.rd: Likewise.
|
||||
* testsuite/ld-x86-64/x86-64.exp: Run tests for -z separate-code
|
||||
-z max-page-size=0x1000.
|
||||
|
||||
2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR ld/22393
|
||||
|
7
ld/testsuite/ld-x86-64/pr22393-3a.c
Normal file
7
ld/testsuite/ld-x86-64/pr22393-3a.c
Normal file
@ -0,0 +1,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
void
|
||||
test()
|
||||
{
|
||||
printf ("PASS\n");
|
||||
}
|
9
ld/testsuite/ld-x86-64/pr22393-3a.rd
Normal file
9
ld/testsuite/ld-x86-64/pr22393-3a.rd
Normal file
@ -0,0 +1,9 @@
|
||||
#source: pr22393-1.s
|
||||
#ld: -shared -z textonly
|
||||
#readelf: -l --wide
|
||||
#target: *-*-linux-gnu *-*-gnu* *-*-nacl*
|
||||
|
||||
#failif
|
||||
#...
|
||||
+[0-9]+ +.*(\.note|\.gnu|\.hash|\.dyn|\.rel).*\.text.*
|
||||
#...
|
7
ld/testsuite/ld-x86-64/pr22393-3b.c
Normal file
7
ld/testsuite/ld-x86-64/pr22393-3b.c
Normal file
@ -0,0 +1,7 @@
|
||||
void test(void);
|
||||
|
||||
int main()
|
||||
{
|
||||
test();
|
||||
return 0;
|
||||
}
|
9
ld/testsuite/ld-x86-64/pr22393-3b.rd
Normal file
9
ld/testsuite/ld-x86-64/pr22393-3b.rd
Normal file
@ -0,0 +1,9 @@
|
||||
#source: pr22393-1.s
|
||||
#ld: -shared -z textonly
|
||||
#readelf: -l --wide
|
||||
#target: *-*-linux-gnu *-*-gnu* *-*-nacl*
|
||||
|
||||
#failif
|
||||
#...
|
||||
+[0-9]+ +.*(\.note|\.gnu|\.hash|\.dyn|\.rel).*\.text.*
|
||||
#...
|
@ -1105,6 +1105,51 @@ if { [isnative] && [which $CC] != 0 } {
|
||||
{} \
|
||||
"pr22064.so" \
|
||||
] \
|
||||
[list \
|
||||
"Build pr22393-3a.so" \
|
||||
"-shared -Wl,-z,separate-code,-z,max-page-size=0x1000" \
|
||||
"-fPIC" \
|
||||
{pr22393-3a.c} \
|
||||
{{readelf -lW pr22393-3a.rd} \
|
||||
{readelf -lW pr22393-3b.rd}} \
|
||||
"pr22393-3a.so" \
|
||||
] \
|
||||
[list \
|
||||
"Build pr22393-3a-now.so" \
|
||||
"-shared -Wl,-z,separate-code,-z,now,-z,max-page-size=0x1000" \
|
||||
"-fPIC" \
|
||||
{pr22393-3a.c} \
|
||||
{{readelf -lW pr22393-3a.rd} \
|
||||
{readelf -lW pr22393-3b.rd}} \
|
||||
"pr22393-3a-now.so" \
|
||||
] \
|
||||
[list \
|
||||
"Build pr22393-3" \
|
||||
"$NOPIE_LDFLAGS -Wl,-z,separate-code,-z,max-page-size=0x1000,--no-as-needed tmpdir/pr22393-2a.so" \
|
||||
"$NOPIE_CFLAGS" \
|
||||
{pr22393-3b.c} \
|
||||
{{readelf -lW pr22393-3a.rd} \
|
||||
{readelf -lW pr22393-3b.rd}} \
|
||||
"pr22393-3" \
|
||||
] \
|
||||
[list \
|
||||
"Build pr22393-3 (PIE)" \
|
||||
"-pie -Wl,-z,separate-code,-z,max-page-size=0x1000,--no-as-needed tmpdir/pr22393-2a-now.so" \
|
||||
"-fPIE" \
|
||||
{pr22393-3b.c} \
|
||||
{{readelf -lW pr22393-3a.rd} \
|
||||
{readelf -lW pr22393-3b.rd}} \
|
||||
"pr22393-3-pie" \
|
||||
] \
|
||||
[list \
|
||||
"Build pr22393-3 (static)" \
|
||||
"-static -Wl,-z,separate-code,-z,max-page-size=0x1000" \
|
||||
"" \
|
||||
{pr22393-3a.c pr22393-3b.c} \
|
||||
{{readelf -lW pr22393-3a.rd} \
|
||||
{readelf -lW pr22393-3b.rd}} \
|
||||
"pr22393-3-static" \
|
||||
] \
|
||||
]
|
||||
|
||||
if {[istarget "x86_64-*-linux*-gnux32"]} {
|
||||
@ -1404,6 +1449,32 @@ if { [isnative] && [which $CC] != 0 } {
|
||||
"pass.out" \
|
||||
"-fPIE" \
|
||||
] \
|
||||
[list \
|
||||
"Run pr22393-3" \
|
||||
"$NOPIE_LDFLAGS -Wl,-z,separate-code,-z,max-page-size=0x1000,--no-as-needed tmpdir/pr22393-3a.so" \
|
||||
"" \
|
||||
{pr22393-3b.c} \
|
||||
"pr22393-3" \
|
||||
"pass.out" \
|
||||
"$NOPIE_CFLAGS" \
|
||||
] \
|
||||
[list \
|
||||
"Run pr22393-3 (PIE)" \
|
||||
"-pie -Wl,-z,separate-code,-z,max-page-size=0x1000,--no-as-needed tmpdir/pr22393-3a-now.so" \
|
||||
"" \
|
||||
{pr22393-3b.c} \
|
||||
"pr22393-3-pie" \
|
||||
"pass.out" \
|
||||
"-fPIE" \
|
||||
] \
|
||||
[list \
|
||||
"Run pr22393-3 (static)" \
|
||||
"-static -Wl,-z,separate-code,-z,max-page-size=0x1000" \
|
||||
"" \
|
||||
{pr22393-3a.c pr22393-3b.c} \
|
||||
"pr22393-3-static" \
|
||||
"pass.out" \
|
||||
] \
|
||||
]
|
||||
|
||||
# Run-time tests which require working ifunc attribute support.
|
||||
|
Loading…
x
Reference in New Issue
Block a user