diff options
Diffstat (limited to 'ld/testsuite')
-rw-r--r-- | ld/testsuite/ChangeLog | 9 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/i386.exp | 8 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/pltgot-1.d | 8 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/pltgot-1.s | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/pltgot-1.d | 8 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/pltgot-1.s | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/x86-64.exp | 1 |
7 files changed, 46 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 89f695c..f7bd9b7 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2015-05-12 H.J. Lu <hongjiu.lu@intel.com> + + * ld-i386/i386.exp: Run pltgot-1 for Linux targets. + * ld-x86-64/x86-64.exp: Likewise. + * ld-i386/pltgot-1.d: New file. + * ld-i386/pltgot-1.s: Likewise. + * ld-x86-64/pltgot-1.d: Likewise. + * ld-x86-64/pltgot-1.s: Likewise. + 2015-05-11 H.J. Lu <hongjiu.lu@intel.com> * ld-i386/i386.exp (iamcu_tests): Run iamcu-4. diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp index 2e59522..bbc6005 100644 --- a/ld/testsuite/ld-i386/i386.exp +++ b/ld/testsuite/ld-i386/i386.exp @@ -493,3 +493,11 @@ if { [isnative] ] \ ] } + +if { !([istarget "i?86-*-linux*"] + || [istarget "x86_64-*-linux*"]) } { + return +} + +# Linux only tests +run_dump_test "pltgot-1" diff --git a/ld/testsuite/ld-i386/pltgot-1.d b/ld/testsuite/ld-i386/pltgot-1.d new file mode 100644 index 0000000..6629635 --- /dev/null +++ b/ld/testsuite/ld-i386/pltgot-1.d @@ -0,0 +1,8 @@ +#ld: -shared -melf_i386 +#readelf: -S --wide +#as: --32 + +#failif +#... + +\[ [0-9]+\] \.plt +PROGBITS +.* +#... diff --git a/ld/testsuite/ld-i386/pltgot-1.s b/ld/testsuite/ld-i386/pltgot-1.s new file mode 100644 index 0000000..0e23078 --- /dev/null +++ b/ld/testsuite/ld-i386/pltgot-1.s @@ -0,0 +1,6 @@ + .text + .globl plt + .type plt, @function +plt: + call *puts@GOT(%ebx) + jmp puts@PLT diff --git a/ld/testsuite/ld-x86-64/pltgot-1.d b/ld/testsuite/ld-x86-64/pltgot-1.d new file mode 100644 index 0000000..9a6c2fd6 --- /dev/null +++ b/ld/testsuite/ld-x86-64/pltgot-1.d @@ -0,0 +1,8 @@ +#ld: -shared -melf_x86_64 +#readelf: -S --wide +#as: --64 + +#failif +#... + +\[ [0-9]+\] \.plt +PROGBITS +.* +#... diff --git a/ld/testsuite/ld-x86-64/pltgot-1.s b/ld/testsuite/ld-x86-64/pltgot-1.s new file mode 100644 index 0000000..2197c75 --- /dev/null +++ b/ld/testsuite/ld-x86-64/pltgot-1.s @@ -0,0 +1,6 @@ + .text + .globl plt + .type plt, @function +plt: + call *puts@GOTPCREL(%rip) + jmp puts@PLT diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp index 8352ad9..58e598e 100644 --- a/ld/testsuite/ld-x86-64/x86-64.exp +++ b/ld/testsuite/ld-x86-64/x86-64.exp @@ -549,3 +549,4 @@ if { ![istarget "x86_64-*-linux*"]} { # Linux only tests run_dump_test "pr17618" +run_dump_test "pltgot-1" |