diff options
Diffstat (limited to 'ld')
-rw-r--r-- | ld/testsuite/ChangeLog | 12 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-10-i386.d | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-10-i386.s | 20 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-10-x86-64.d | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-10-x86-64.s | 20 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-11-i386.d | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-11-i386.s | 21 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-11-x86-64.d | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-11-x86-64.s | 21 |
9 files changed, 118 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 463a14c..6755523 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,15 @@ +2010-07-13 H.J. Lu <hongjiu.lu@intel.com> + + PR ld/11791 + * ld-ifunc/ifunc-10-i386.d: New. + * ld-ifunc/ifunc-10-i386.s: Likewise. + * ld-ifunc/ifunc-10-x86-64.d: Likewise. + * ld-ifunc/ifunc-10-x86-64.s: Likewise. + * ld-ifunc/ifunc-11-i386.d: Likewise. + * ld-ifunc/ifunc-11-i386.s: Likewise. + * ld-ifunc/ifunc-11-x86-64.d: Likewise. + * ld-ifunc/ifunc-11-x86-64.s: Likewise. + 2010-07-06 Alan Modra <amodra@gmail.com> * ld-powerpc/relax.s: Add branch back to _start. diff --git a/ld/testsuite/ld-ifunc/ifunc-10-i386.d b/ld/testsuite/ld-ifunc/ifunc-10-i386.d new file mode 100644 index 0000000..5f56b24 --- /dev/null +++ b/ld/testsuite/ld-ifunc/ifunc-10-i386.d @@ -0,0 +1,6 @@ +#ld: -m elf_i386 -e bar --gc-sections +#as: --32 +#readelf: -r --wide +#target: x86_64-*-* i?86-*-* + +There are no relocations in this file. diff --git a/ld/testsuite/ld-ifunc/ifunc-10-i386.s b/ld/testsuite/ld-ifunc/ifunc-10-i386.s new file mode 100644 index 0000000..8411e81 --- /dev/null +++ b/ld/testsuite/ld-ifunc/ifunc-10-i386.s @@ -0,0 +1,20 @@ + .section .text.foo,"ax",@progbits + .type foo, @function +foo: + .global foo + movl ifunc@GOT(%ecx), %eax + movl ifunc@GOTOFF(%ecx), %eax + call ifunc@PLT + call ifunc + ret + + .section .text.bar,"ax",@progbits + .type bar, @function +bar: + .global bar + ret + + .section .text.ifunc,"ax",@progbits + .type ifunc, @gnu_indirect_function +ifunc: + ret diff --git a/ld/testsuite/ld-ifunc/ifunc-10-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-10-x86-64.d new file mode 100644 index 0000000..8ece379 --- /dev/null +++ b/ld/testsuite/ld-ifunc/ifunc-10-x86-64.d @@ -0,0 +1,6 @@ +#ld: -m elf_x86_64 -e bar --gc-sections +#as: --64 +#readelf: -r --wide +#target: x86_64-*-* + +There are no relocations in this file. diff --git a/ld/testsuite/ld-ifunc/ifunc-10-x86-64.s b/ld/testsuite/ld-ifunc/ifunc-10-x86-64.s new file mode 100644 index 0000000..ea6f8c2 --- /dev/null +++ b/ld/testsuite/ld-ifunc/ifunc-10-x86-64.s @@ -0,0 +1,20 @@ + .section .text.foo,"ax",@progbits + .type foo, @function +foo: + .global foo + movl ifunc@GOTPCREL(%rip), %eax + movl ifunc(%rip), %eax + call ifunc@PLT + call ifunc + ret + + .section .text.bar,"ax",@progbits + .type bar, @function +bar: + .global bar + ret + + .section .text.ifunc,"ax",@progbits + .type ifunc, @gnu_indirect_function +ifunc: + ret diff --git a/ld/testsuite/ld-ifunc/ifunc-11-i386.d b/ld/testsuite/ld-ifunc/ifunc-11-i386.d new file mode 100644 index 0000000..5f56b24 --- /dev/null +++ b/ld/testsuite/ld-ifunc/ifunc-11-i386.d @@ -0,0 +1,6 @@ +#ld: -m elf_i386 -e bar --gc-sections +#as: --32 +#readelf: -r --wide +#target: x86_64-*-* i?86-*-* + +There are no relocations in this file. diff --git a/ld/testsuite/ld-ifunc/ifunc-11-i386.s b/ld/testsuite/ld-ifunc/ifunc-11-i386.s new file mode 100644 index 0000000..06f5924 --- /dev/null +++ b/ld/testsuite/ld-ifunc/ifunc-11-i386.s @@ -0,0 +1,21 @@ + .section .text.foo,"ax",@progbits + .type foo, @function +foo: + .global foo + movl ifunc@GOT(%ecx), %eax + movl ifunc@GOTOFF(%ecx), %eax + call ifunc@PLT + call ifunc + ret + + .section .text.bar,"ax",@progbits + .type bar, @function +bar: + .global bar + ret + + .section .text.ifunc,"ax",@progbits + .type ifunc, @gnu_indirect_function + .global ifunc +ifunc: + ret diff --git a/ld/testsuite/ld-ifunc/ifunc-11-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-11-x86-64.d new file mode 100644 index 0000000..8ece379 --- /dev/null +++ b/ld/testsuite/ld-ifunc/ifunc-11-x86-64.d @@ -0,0 +1,6 @@ +#ld: -m elf_x86_64 -e bar --gc-sections +#as: --64 +#readelf: -r --wide +#target: x86_64-*-* + +There are no relocations in this file. diff --git a/ld/testsuite/ld-ifunc/ifunc-11-x86-64.s b/ld/testsuite/ld-ifunc/ifunc-11-x86-64.s new file mode 100644 index 0000000..70d4fbf --- /dev/null +++ b/ld/testsuite/ld-ifunc/ifunc-11-x86-64.s @@ -0,0 +1,21 @@ + .section .text.foo,"ax",@progbits + .type foo, @function +foo: + .global foo + movl ifunc@GOTPCREL(%rip), %eax + movl ifunc(%rip), %eax + call ifunc@PLT + call ifunc + ret + + .section .text.bar,"ax",@progbits + .type bar, @function +bar: + .global bar + ret + + .section .text.ifunc,"ax",@progbits + .type ifunc, @gnu_indirect_function + .global ifunc +ifunc: + ret |