diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2009-06-14 22:13:30 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2009-06-14 22:13:30 +0000 |
commit | 44c4ea11d335f8d5691e9ea5c38c3187ab568467 (patch) | |
tree | 734174e15f439d07e818c3c3b01f2da4919aae65 /ld/testsuite/ld-ifunc | |
parent | f6475b4872707a92be2c7c28f83d55d891a93ed2 (diff) | |
download | gdb-44c4ea11d335f8d5691e9ea5c38c3187ab568467.zip gdb-44c4ea11d335f8d5691e9ea5c38c3187ab568467.tar.gz gdb-44c4ea11d335f8d5691e9ea5c38c3187ab568467.tar.bz2 |
bfd/
2009-06-14 H.J. Lu <hongjiu.lu@intel.com>
PR ld/10270
* elf32-i386.c (elf_i386_allocate_dynrelocs): Disallow
dynamic IFUNC pointer in non-shared object. Use .got.plt
for IFUNC definition in PIE.
(elf_i386_allocate_dynrelocs): Resolve IFUNC definition in
PIE locally.
* elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Disallow
dynamic IFUNC pointer in non-shared object. Use .got.plt
for IFUNC definition in PIE.
(elf64_x86_64_relocate_section): Resolve IFUNC definition in
PIE locally.
ld/testsuite/
2009-06-14 H.J. Lu <hongjiu.lu@intel.com>
PR ld/10270
* ld-ifunc/ifunc-9-x86.d: New.
* ld-ifunc/ifunc-9-x86.s: Likewise.
Diffstat (limited to 'ld/testsuite/ld-ifunc')
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-9-x86.d | 3 | ||||
-rw-r--r-- | ld/testsuite/ld-ifunc/ifunc-9-x86.s | 18 |
2 files changed, 21 insertions, 0 deletions
diff --git a/ld/testsuite/ld-ifunc/ifunc-9-x86.d b/ld/testsuite/ld-ifunc/ifunc-9-x86.d new file mode 100644 index 0000000..207c5d4 --- /dev/null +++ b/ld/testsuite/ld-ifunc/ifunc-9-x86.d @@ -0,0 +1,3 @@ +#ld: --export-dynamic +#error: .*dynamic STT_GNU_IFUNC symbool `foo' with pointer equality in `.*.o' can not be used when making an executable; recompile with -fPIE and relink with -pie +#target: x86_64-*-* i?86-*-* diff --git a/ld/testsuite/ld-ifunc/ifunc-9-x86.s b/ld/testsuite/ld-ifunc/ifunc-9-x86.s new file mode 100644 index 0000000..05321e4 --- /dev/null +++ b/ld/testsuite/ld-ifunc/ifunc-9-x86.s @@ -0,0 +1,18 @@ + .text + .type foo, %gnu_indirect_function +.globl foo + .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" + movl foo, %eax |