diff options
Diffstat (limited to 'ld/testsuite/ld-ifunc')
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-13-i386.d | 13 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-13-x86-64.d | 10 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-15-i386.d | 13 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-15-i386.s | 10 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-15-x86-64.d | 13 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-15-x86-64.s | 10 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-3a-x86.d | 2 |
7 files changed, 56 insertions, 15 deletions
diff --git a/ld/testsuite/ld-ifunc/ifunc-13-i386.d b/ld/testsuite/ld-ifunc/ifunc-13-i386.d index 162c3e4..55cca22 100644 --- a/ld/testsuite/ld-ifunc/ifunc-13-i386.d +++ b/ld/testsuite/ld-ifunc/ifunc-13-i386.d @@ -5,15 +5,14 @@ #readelf: -r --wide #target: x86_64-*-* i?86-*-* -Relocation section '.rel.got' at .* +Relocation section '.rel.got' at offset 0x[0-9a-f]+ contains 1 entries: [ ]+Offset[ ]+Info[ ]+Type[ ]+.* -#... -[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_386_GLOB_DAT[ ]+ifunc\(\)[ ]+ifunc -#... -Relocation section '.rel.ifunc' at .* +[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_386_RELATIVE[ ]+ + +Relocation section '.rel.ifunc' at offset 0x[0-9a-f]+ contains 1 entries: [ ]+Offset[ ]+Info[ ]+Type[ ]+.* [0-9a-f]+[ ]+[0-9a-f]+[ ]+R_386_32[ ]+ifunc\(\)[ ]+ifunc -#... -Relocation section '.rel.plt' at .* + +Relocation section '.rel.plt' at offset 0x[0-9a-f]+ contains 1 entries: [ ]+Offset[ ]+Info[ ]+Type[ ]+.* [0-9a-f]+[ ]+[0-9a-f]+[ ]+R_386_JUMP_SLOT[ ]+ifunc\(\)[ ]+ifunc diff --git a/ld/testsuite/ld-ifunc/ifunc-13-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-13-x86-64.d index d0c0647..b01c735 100644 --- a/ld/testsuite/ld-ifunc/ifunc-13-x86-64.d +++ b/ld/testsuite/ld-ifunc/ifunc-13-x86-64.d @@ -5,14 +5,10 @@ #readelf: -r --wide #target: x86_64-*-* -Relocation section '.rela.got' at .* -[ ]+Offset[ ]+Info[ ]+Type[ ]+.* -[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_X86_64_GLOB_DAT[ ]+ifunc\(\)[ ]+ifunc \+ 0 -#... -Relocation section '.rela.ifunc' at .* +Relocation section '.rela.ifunc' at offset 0x[0-9a-f]+ contains 1 entries: [ ]+Offset[ ]+Info[ ]+Type[ ]+.* [0-9a-f]+[ ]+[0-9a-f]+[ ]+R_X86_64_64[ ]+ifunc\(\)[ ]+ifunc \+ 0 -#... -Relocation section '.rela.plt' at .* + +Relocation section '.rela.plt' at offset 0x[0-9a-f]+ contains 1 entries: [ ]+Offset[ ]+Info[ ]+Type[ ]+.* [0-9a-f]+[ ]+[0-9a-f]+[ ]+R_X86_64_JUMP_SLOT[ ]+ifunc\(\)[ ]+ifunc \+ 0 diff --git a/ld/testsuite/ld-ifunc/ifunc-15-i386.d b/ld/testsuite/ld-ifunc/ifunc-15-i386.d new file mode 100644 index 0000000..c37dd51 --- /dev/null +++ b/ld/testsuite/ld-ifunc/ifunc-15-i386.d @@ -0,0 +1,13 @@ +#source: ifunc-15-i386.s +#ld: -shared -m elf_i386 -z nocombreloc +#as: --32 +#readelf: -r --wide +#target: x86_64-*-* i?86-*-* + +Relocation section '.rel.got' at offset 0x[0-9a-f]+ contains 1 entries: +[ ]+Offset[ ]+Info[ ]+Type[ ]+.* +[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_386_GLOB_DAT[ ]+ifunc\(\)[ ]+ifunc + +Relocation section '.rel.plt' at offset 0x[0-9a-f]+ contains 1 entries: +[ ]+Offset[ ]+Info[ ]+Type[ ]+.* +[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_386_JUMP_SLOT[ ]+ifunc\(\)[ ]+ifunc diff --git a/ld/testsuite/ld-ifunc/ifunc-15-i386.s b/ld/testsuite/ld-ifunc/ifunc-15-i386.s new file mode 100644 index 0000000..5ee4fab --- /dev/null +++ b/ld/testsuite/ld-ifunc/ifunc-15-i386.s @@ -0,0 +1,10 @@ + .text + .type foo, @function + .global +foo: + movl ifunc@GOT(%ebx), %eax + ret + .type ifunc, @gnu_indirect_function + .globl ifunc +ifunc: + ret diff --git a/ld/testsuite/ld-ifunc/ifunc-15-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-15-x86-64.d new file mode 100644 index 0000000..a4a5cb1 --- /dev/null +++ b/ld/testsuite/ld-ifunc/ifunc-15-x86-64.d @@ -0,0 +1,13 @@ +#source: ifunc-15-x86-64.s +#ld: -shared -m elf_x86_64 -z nocombreloc +#as: --64 +#readelf: -r --wide +#target: x86_64-*-* + +Relocation section '.rela.got' at offset 0x[0-9a-f]+ contains 1 entries: +[ ]+Offset[ ]+Info[ ]+Type[ ]+.* +[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_X86_64_GLOB_DAT[ ]+ifunc\(\)[ ]+ifunc \+ 0 + +Relocation section '.rela.plt' at offset 0x[0-9a-f]+ contains 1 entries: +[ ]+Offset[ ]+Info[ ]+Type[ ]+.* +[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_X86_64_JUMP_SLOT[ ]+ifunc\(\)[ ]+ifunc \+ 0 diff --git a/ld/testsuite/ld-ifunc/ifunc-15-x86-64.s b/ld/testsuite/ld-ifunc/ifunc-15-x86-64.s new file mode 100644 index 0000000..ee336de --- /dev/null +++ b/ld/testsuite/ld-ifunc/ifunc-15-x86-64.s @@ -0,0 +1,10 @@ + .text + .type foo, @function + .global +foo: + movl ifunc@GOTPCREL(%rip), %eax + ret + .type ifunc, @gnu_indirect_function + .globl ifunc +ifunc: + ret diff --git a/ld/testsuite/ld-ifunc/ifunc-3a-x86.d b/ld/testsuite/ld-ifunc/ifunc-3a-x86.d index 174999d..24be639 100644 --- a/ld/testsuite/ld-ifunc/ifunc-3a-x86.d +++ b/ld/testsuite/ld-ifunc/ifunc-3a-x86.d @@ -4,5 +4,5 @@ #target: x86_64-*-* i?86-*-* #... -[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*(\+0x1b0|\+0x260|)@plt> +[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*(\+0x1b0|\+0x240|)@plt> #pass |