diff options
Diffstat (limited to 'ld/testsuite')
-rw-r--r-- | ld/testsuite/ChangeLog | 18 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-1-local-x86.d | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-1-local-x86.s | 13 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-2-local-i386.d | 8 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-2-local-i386.s | 18 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-2-local-x86-64.d | 9 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-2-local-x86-64.s | 17 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-4-local-x86.d | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-4-local-x86.s | 18 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-5-local-i386.s | 22 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-5-local-x86-64.s | 18 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-5a-local-i386.d | 9 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-5a-local-x86-64.d | 9 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-5b-local-i386.d | 9 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-5b-local-x86-64.d | 9 |
15 files changed, 191 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index bdf657f..26a526d 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,21 @@ +2009-06-13 H.J. Lu <hongjiu.lu@intel.com> + + PR ld/10269 + *: ld-ifunc/ifunc-1-local-x86.d: New. + *: ld-ifunc/ifunc-1-local-x86.s: Likewise. + *: ld-ifunc/ifunc-2-local-i386.d: Likewise. + *: ld-ifunc/ifunc-2-local-i386.s: Likewise. + *: ld-ifunc/ifunc-2-local-x86-64.d: Likewise. + *: ld-ifunc/ifunc-2-local-x86-64.s: Likewise. + *: ld-ifunc/ifunc-4-local-x86.d: Likewise. + *: ld-ifunc/ifunc-4-local-x86.s: Likewise. + *: ld-ifunc/ifunc-5-local-i386.s: Likewise. + *: ld-ifunc/ifunc-5-local-x86-64.s: Likewise. + *: ld-ifunc/ifunc-5a-local-i386.d: Likewise. + *: ld-ifunc/ifunc-5a-local-x86-64.d: Likewise. + *: ld-ifunc/ifunc-5b-local-i386.d: Likewise. + *: ld-ifunc/ifunc-5b-local-x86-64.d: Likewise. + 2009-06-03 H.J. Lu <hongjiu.lu@intel.com> * ld-ifunc/ifunc-2-x86-64.d: Pass --64 to as and -melf_x86_64 to diff --git a/ld/testsuite/ld-ifunc/ifunc-1-local-x86.d b/ld/testsuite/ld-ifunc/ifunc-1-local-x86.d new file mode 100644 index 0000000..ee043b1207 --- /dev/null +++ b/ld/testsuite/ld-ifunc/ifunc-1-local-x86.d @@ -0,0 +1,7 @@ +#ld: -shared +#objdump: -dw +#target: x86_64-*-* i?86-*-* + +#... +[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*@plt> +#pass diff --git a/ld/testsuite/ld-ifunc/ifunc-1-local-x86.s b/ld/testsuite/ld-ifunc/ifunc-1-local-x86.s new file mode 100644 index 0000000..bd2b5bb --- /dev/null +++ b/ld/testsuite/ld-ifunc/ifunc-1-local-x86.s @@ -0,0 +1,13 @@ + .type foo, %gnu_indirect_function + .set __GI_foo, foo + .text + .type foo, @function +foo: + ret + .size foo, .-foo +.globl bar + .type bar, @function +bar: + call __GI_foo@PLT + ret + .size bar, .-bar diff --git a/ld/testsuite/ld-ifunc/ifunc-2-local-i386.d b/ld/testsuite/ld-ifunc/ifunc-2-local-i386.d new file mode 100644 index 0000000..7dfc1fe --- /dev/null +++ b/ld/testsuite/ld-ifunc/ifunc-2-local-i386.d @@ -0,0 +1,8 @@ +#ld: -m elf_i386 -shared +#as: --32 +#objdump: -dw +#target: x86_64-*-* i?86-*-* + +#... +[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-f]+<\*ABS\*@plt> +#pass diff --git a/ld/testsuite/ld-ifunc/ifunc-2-local-i386.s b/ld/testsuite/ld-ifunc/ifunc-2-local-i386.s new file mode 100644 index 0000000..4e0b6ae --- /dev/null +++ b/ld/testsuite/ld-ifunc/ifunc-2-local-i386.s @@ -0,0 +1,18 @@ + .type foo, %gnu_indirect_function + .set __GI_foo, foo + .text + .type foo, @function +foo: + ret + .size foo, .-foo +.globl bar + .type bar, @function +bar: + call .L6 +.L6: + popl %ebx + addl $_GLOBAL_OFFSET_TABLE_+[.-.L6], %ebx + call __GI_foo + leal __GI_foo@GOTOFF(%ebx), %eax + ret + .size bar, .-bar diff --git a/ld/testsuite/ld-ifunc/ifunc-2-local-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-2-local-x86-64.d new file mode 100644 index 0000000..fa87102 --- /dev/null +++ b/ld/testsuite/ld-ifunc/ifunc-2-local-x86-64.d @@ -0,0 +1,9 @@ +#as: --64 +#ld: -shared -melf_x86_64 +#objdump: -dw +#target: x86_64-*-* + +#... +[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*@plt> +[ \t0-9a-f]+:[ \t0-9a-f]+lea[ \t]+.*\(%rip\),%rax.*[ \t0-9a-fq]+<\*ABS\*@plt> +#pass diff --git a/ld/testsuite/ld-ifunc/ifunc-2-local-x86-64.s b/ld/testsuite/ld-ifunc/ifunc-2-local-x86-64.s new file mode 100644 index 0000000..4137ff1 --- /dev/null +++ b/ld/testsuite/ld-ifunc/ifunc-2-local-x86-64.s @@ -0,0 +1,17 @@ + .type foo, %gnu_indirect_function + .global __GI_foo + .hidden __GI_foo + .set __GI_foo, foo + .text +.globl foo + .type foo, @function +foo: + ret + .size foo, .-foo +.globl bar + .type bar, @function +bar: + call __GI_foo + leaq __GI_foo(%rip), %rax + ret + .size bar, .-bar diff --git a/ld/testsuite/ld-ifunc/ifunc-4-local-x86.d b/ld/testsuite/ld-ifunc/ifunc-4-local-x86.d new file mode 100644 index 0000000..5fe66e0 --- /dev/null +++ b/ld/testsuite/ld-ifunc/ifunc-4-local-x86.d @@ -0,0 +1,7 @@ +#ld: +#readelf: -r --wide +#target: x86_64-*-* i?86-*-* + +#... +[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_[_0-9A-Z]+_IRELATIVE[ ]*[0-9a-f]* +#pass diff --git a/ld/testsuite/ld-ifunc/ifunc-4-local-x86.s b/ld/testsuite/ld-ifunc/ifunc-4-local-x86.s new file mode 100644 index 0000000..4f72d7f --- /dev/null +++ b/ld/testsuite/ld-ifunc/ifunc-4-local-x86.s @@ -0,0 +1,18 @@ + .text + .type foo, %gnu_indirect_function + .type foo, @function +foo: + ret + .size foo, .-foo + .type start,"function" + .global start +start: + .type _start,"function" + .global _start +_start: + .type __start,"function" + .global __start +__start: + .type __start,"function" + call foo + movl $foo,%eax diff --git a/ld/testsuite/ld-ifunc/ifunc-5-local-i386.s b/ld/testsuite/ld-ifunc/ifunc-5-local-i386.s new file mode 100644 index 0000000..d7bb5cf --- /dev/null +++ b/ld/testsuite/ld-ifunc/ifunc-5-local-i386.s @@ -0,0 +1,22 @@ + .text + .type foo, %gnu_indirect_function + .type foo, @function +foo: + ret + .size foo, .-foo + .type start,"function" + .global start +start: + .type _start,"function" + .global _start +_start: + .type __start,"function" + .global __start +__start: + .type __start,"function" + call .L6 +.L6: + popl %ebx + addl $_GLOBAL_OFFSET_TABLE_+[.-.L6], %ebx + call foo@PLT + leal foo@GOT(%ebx), %eax diff --git a/ld/testsuite/ld-ifunc/ifunc-5-local-x86-64.s b/ld/testsuite/ld-ifunc/ifunc-5-local-x86-64.s new file mode 100644 index 0000000..5469747 --- /dev/null +++ b/ld/testsuite/ld-ifunc/ifunc-5-local-x86-64.s @@ -0,0 +1,18 @@ + .text + .type foo, %gnu_indirect_function + .type foo, @function +foo: + ret + .size foo, .-foo + .type start,"function" + .global start +start: + .type _start,"function" + .global _start +_start: + .type __start,"function" + .global __start +__start: + .type __start,"function" + call foo@PLT + movq foo@GOTPCREL(%rip), %rax diff --git a/ld/testsuite/ld-ifunc/ifunc-5a-local-i386.d b/ld/testsuite/ld-ifunc/ifunc-5a-local-i386.d new file mode 100644 index 0000000..88814f7 --- /dev/null +++ b/ld/testsuite/ld-ifunc/ifunc-5a-local-i386.d @@ -0,0 +1,9 @@ +#source: ifunc-5-local-i386.s +#ld: -m elf_i386 +#as: --32 +#readelf: -r --wide +#target: x86_64-*-* i?86-*-* + +Relocation section '.rel.plt' at .* +[ ]+Offset[ ]+Info[ ]+Type[ ]+.* +[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_386_IRELATIVE[ ]* diff --git a/ld/testsuite/ld-ifunc/ifunc-5a-local-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-5a-local-x86-64.d new file mode 100644 index 0000000..73a822d --- /dev/null +++ b/ld/testsuite/ld-ifunc/ifunc-5a-local-x86-64.d @@ -0,0 +1,9 @@ +#source: ifunc-5-local-x86-64.s +#as: --64 +#ld: -melf_x86_64 +#readelf: -r --wide +#target: x86_64-*-* + +Relocation section '.rela.plt' at .* +[ ]+Offset[ ]+Info[ ]+Type[ ]+.* +[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_X86_64_IRELATIVE[ ]+[0-9a-f]* diff --git a/ld/testsuite/ld-ifunc/ifunc-5b-local-i386.d b/ld/testsuite/ld-ifunc/ifunc-5b-local-i386.d new file mode 100644 index 0000000..75cb7d9 --- /dev/null +++ b/ld/testsuite/ld-ifunc/ifunc-5b-local-i386.d @@ -0,0 +1,9 @@ +#source: ifunc-5-local-i386.s +#ld: -shared -m elf_i386 -z nocombreloc +#as: --32 +#readelf: -r --wide +#target: x86_64-*-* i?86-*-* + +Relocation section '.rel.plt' at .* +[ ]+Offset[ ]+Info[ ]+Type[ ]+.* +[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_386_IRELATIVE[ ]* diff --git a/ld/testsuite/ld-ifunc/ifunc-5b-local-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-5b-local-x86-64.d new file mode 100644 index 0000000..3913dd6 --- /dev/null +++ b/ld/testsuite/ld-ifunc/ifunc-5b-local-x86-64.d @@ -0,0 +1,9 @@ +#source: ifunc-5-local-x86-64.s +#as: --64 +#ld: -melf_x86_64 -shared -z nocombreloc +#readelf: -r --wide +#target: x86_64-*-* + +Relocation section '.rela.plt' at .* +[ ]+Offset[ ]+Info[ ]+Type[ ]+.* +[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_X86_64_IRELATIVE[ ]+[0-9a-f]* |