diff options
Diffstat (limited to 'ld/testsuite')
-rw-r--r-- | ld/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/i386.exp | 24 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/pr17689now.rd | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/pr17689now.rd | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/x86-64.exp | 24 |
5 files changed, 63 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 43c7c24..e6a551c 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2015-05-16 H.J. Lu <hongjiu.lu@intel.com> + + * ld-i386/i386.exp: Run PR ld/17689 tests with -z now. + * ld-x86-64/x86-64.exp: Likewise + * ld-i386/pr17689now.rd: New file. + * ld-x86-64/pr17689now.rd: Likewise + 2015-05-15 H.J. Lu <hongjiu.lu@intel.com> PR binutis/18386 diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp index bbc6005..a26cffd 100644 --- a/ld/testsuite/ld-i386/i386.exp +++ b/ld/testsuite/ld-i386/i386.exp @@ -406,6 +406,14 @@ if { [isnative] "pr17689.so" \ ] \ [list \ + "Build pr17689.so with -z now" \ + "-shared -Wl,-z,now" \ + "-fPIC" \ + { pr17689a.c } \ + {{readelf {-Wr} pr17689now.rd}} \ + "pr17689now.so" \ + ] \ + [list \ "Build pr17689ver.so" \ "-shared -Wl,--version-script,pr17689a.t" \ "-fPIC" \ @@ -430,6 +438,14 @@ if { [isnative] "pr17689" \ ] \ [list \ + "Build pr17689 with PIE, -z now and GOTOFF" \ + "tmpdir/pr17689b.o tmpdir/pr17689.so -pie -Wl,-z,now" \ + "" \ + { dummy.c } \ + {{readelf {-Wr} pr17689now.rd}} \ + "pr17689now" \ + ] \ + [list \ "Build pr17689ver with PIE and GOTOFF" \ "tmpdir/pr17689b.o tmpdir/pr17689ver.so -pie" \ "" \ @@ -484,6 +500,14 @@ if { [isnative] "pr17689.out" \ ] \ [list \ + "Run pr17689 with PIE, -z now and GOTOFF" \ + "tmpdir/pr17689b.o tmpdir/pr17689.so -pie -z now" \ + "" \ + { dummy.c } \ + "pr17689now" \ + "pr17689.out" \ + ] \ + [list \ "Run pr17689ver with PIE and GOTOFF" \ "tmpdir/pr17689b.o tmpdir/pr17689ver.so -pie" \ "" \ diff --git a/ld/testsuite/ld-i386/pr17689now.rd b/ld/testsuite/ld-i386/pr17689now.rd new file mode 100644 index 0000000..9741df8 --- /dev/null +++ b/ld/testsuite/ld-i386/pr17689now.rd @@ -0,0 +1,4 @@ +#failif +#... +[0-9a-f ]+R_386_JUMP_SLOT +0+.* +#... diff --git a/ld/testsuite/ld-x86-64/pr17689now.rd b/ld/testsuite/ld-x86-64/pr17689now.rd new file mode 100644 index 0000000..8fd9371 --- /dev/null +++ b/ld/testsuite/ld-x86-64/pr17689now.rd @@ -0,0 +1,4 @@ +#failif +#... +[0-9a-f ]+R_X86_64_JUMP_SLOT +0+ +.* +#... diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp index a312271..8281dc4 100644 --- a/ld/testsuite/ld-x86-64/x86-64.exp +++ b/ld/testsuite/ld-x86-64/x86-64.exp @@ -440,6 +440,14 @@ if { [isnative] && [which $CC] != 0 } { "pr17689.so" \ ] \ [list \ + "Build pr17689now.so with -z now" \ + "-shared -Wl,-z,now" \ + "-fPIC" \ + { pr17689a.c } \ + {{readelf {-Wr} pr17689now.rd}} \ + "pr17689now.so" \ + ] \ + [list \ "Build pr17689 with PIE without -fPIE" \ "tmpdir/pr17689.so -pie" \ "" \ @@ -448,6 +456,14 @@ if { [isnative] && [which $CC] != 0 } { "pr17689" \ ] \ [list \ + "Build pr17689 with PIE -z now without -fPIE" \ + "tmpdir/pr17689.so -pie -Wl,-z,now" \ + "" \ + { pr17689b.S } \ + {{readelf {-Wr} pr17689now.rd}} \ + "pr17689now" \ + ] \ + [list \ "Build pr17827 with PIE without -fPIE" \ "tmpdir/pr17689.so -pie" \ "" \ @@ -493,6 +509,14 @@ if { [isnative] && [which $CC] != 0 } { "pr17689" \ "pr17689.out" \ ] \ + [list \ + "Run pr17689 with PIE -z now without -fPIE" \ + "tmpdir/pr17689.so -pie -z now" \ + "" \ + { pr17689b.S } \ + "pr17689now" \ + "pr17689.out" \ + ] \ ] if { [istarget "x86_64-*-linux*"] \ |