diff options
Diffstat (limited to 'ld/testsuite/ld-x86-64')
-rw-r--r-- | ld/testsuite/ld-x86-64/protected6.d | 3 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/protected6.s | 14 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/protected7.s | 12 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/protected7a.d | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/protected7b.d | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/x86-64.exp | 3 |
6 files changed, 42 insertions, 0 deletions
diff --git a/ld/testsuite/ld-x86-64/protected6.d b/ld/testsuite/ld-x86-64/protected6.d new file mode 100644 index 0000000..872a9f6 --- /dev/null +++ b/ld/testsuite/ld-x86-64/protected6.d @@ -0,0 +1,3 @@ +#as: --64 +#ld: -shared -melf_x86_64 +#error: .*relocation R_X86_64_GOTOFF64 against protected data `foo' can not be used when making a shared object diff --git a/ld/testsuite/ld-x86-64/protected6.s b/ld/testsuite/ld-x86-64/protected6.s new file mode 100644 index 0000000..8ac69c5 --- /dev/null +++ b/ld/testsuite/ld-x86-64/protected6.s @@ -0,0 +1,14 @@ + .protected foo +.globl foo + .data + .align 4 + .type foo, @object + .size foo, 4 +foo: + .long 1 + .text + .globl bar + .type bar, @function +bar: + movabsq $foo@GOTOFF, %rax + .size bar, .-bar diff --git a/ld/testsuite/ld-x86-64/protected7.s b/ld/testsuite/ld-x86-64/protected7.s new file mode 100644 index 0000000..df4765d --- /dev/null +++ b/ld/testsuite/ld-x86-64/protected7.s @@ -0,0 +1,12 @@ + .text +.globl foo + .protected foo + .type foo, @function +foo: + ret + .size foo, .-foo +.globl bar + .type bar, @function +bar: + movabsq $foo@GOTOFF, %rax + .size bar, .-bar diff --git a/ld/testsuite/ld-x86-64/protected7a.d b/ld/testsuite/ld-x86-64/protected7a.d new file mode 100644 index 0000000..3082084 --- /dev/null +++ b/ld/testsuite/ld-x86-64/protected7a.d @@ -0,0 +1,4 @@ +#source: protected7.s +#as: --64 +#ld: -shared -melf_x86_64 +#error: .*relocation R_X86_64_GOTOFF64 against protected function `foo' can not be used when making a shared object diff --git a/ld/testsuite/ld-x86-64/protected7b.d b/ld/testsuite/ld-x86-64/protected7b.d new file mode 100644 index 0000000..e18026c --- /dev/null +++ b/ld/testsuite/ld-x86-64/protected7b.d @@ -0,0 +1,6 @@ +#source: protected7.s +#as: --64 +#ld: -shared -Bsymbolic -melf_x86_64 +#readelf: -r + +There are no relocations in this file. diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp index 98514ed..63754ef 100644 --- a/ld/testsuite/ld-x86-64/x86-64.exp +++ b/ld/testsuite/ld-x86-64/x86-64.exp @@ -218,6 +218,9 @@ run_dump_test "protected3" run_dump_test "protected3-l1om" run_dump_test "protected4" run_dump_test "protected5" +run_dump_test "protected6" +run_dump_test "protected7a" +run_dump_test "protected7b" run_dump_test "tlsle1" run_dump_test "tlspie1" run_dump_test "unique1" |