diff options
author | H.J. Lu <hjl@lucon.org> | 2009-06-14 22:13:30 +0000 |
---|---|---|
committer | H.J. Lu <hjl@lucon.org> | 2009-06-14 22:13:30 +0000 |
commit | 7390c5327e5c35af26a397b713437cd3565becdb (patch) | |
tree | 26d472459ee2c9004caaabe961448cd551b84a38 /ld/testsuite/ld-ifunc | |
parent | 944eaf34d14a850d572ea611fa2ac668f245b352 (diff) | |
download | binutils-redhat-7390c5327e5c35af26a397b713437cd3565becdb.tar.gz |
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 0000000000..207c5d4a84 --- /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 0000000000..05321e423d --- /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 |