summaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-ifunc/ifunc-7-i386.s
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2009-06-02 17:31:42 +0000
committerH.J. Lu <hjl.tools@gmail.com>2009-06-02 17:31:42 +0000
commit7afd84dc1f020ccc7e867f41ef49656314ec4338 (patch)
treebcfc25d5b6299556b0a4f486dcf7afee8e60d3b3 /ld/testsuite/ld-ifunc/ifunc-7-i386.s
parent06c582ac9d955767b5225ddac463af30b057510d (diff)
downloadbinutils-gdb-7afd84dc1f020ccc7e867f41ef49656314ec4338.tar.gz
bfd/
2009-06-02 H.J. Lu <hongjiu.lu@intel.com> * elf32-i386.c (elf_i386_check_relocs): Increment got.refcount for R_386_GOT32/R_386_GOTOFF relocations against STT_GNU_IFUNC symbol. (elf_i386_allocate_dynrelocs): Set got.refcount to 0 if local STT_GNU_IFUNC definition is used. (elf_i386_relocate_section): Handle got.offset != -1 for R_386_GOT32/R_386_GOTOFF relocations against STT_GNU_IFUNC symbol. * elf64-x86-64.c (elf64_x86_64_check_relocs): Increment got.refcount for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64 relocations against STT_GNU_IFUNC symbol. (elf64_x86_64_allocate_dynrelocs): Set got.refcount to 0 if local STT_GNU_IFUNC definition is used. (elf64_x86_64_relocate_section): Handle got.offset != -1 for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64 relocations against STT_GNU_IFUNC symbol. ld/testsuite/ 2009-06-02 H.J. Lu <hongjiu.lu@intel.com> * ld-ifunc/ifunc-5-i386.d: Renamed to ... * ld-ifunc/ifunc-5a-i386.d: This. * ld-ifunc/ifunc-5-x86-64.d: Renamed to ... * ld-ifunc/ifunc-5a-x86-64.d: This. * ld-ifunc/ifunc-5b-i386.d: New. * ld-ifunc/ifunc-5b-x86-64.d: Likewise. * ld-ifunc/ifunc-6a-i386.d: Likewise. * ld-ifunc/ifunc-6a-x86-64.d: Likewise. * ld-ifunc/ifunc-6b-i386.d: Likewise. * ld-ifunc/ifunc-6b-x86-64.d: Likewise. * ld-ifunc/ifunc-6-i386.s: Likewise. * ld-ifunc/ifunc-6-x86-64.s: Likewise. * ld-ifunc/ifunc-7a-i386.d: Likewise. * ld-ifunc/ifunc-7a-x86-64.d: Likewise. * ld-ifunc/ifunc-7b-i386.d: Likewise. * ld-ifunc/ifunc-7b-x86-64.d: Likewise. * ld-ifunc/ifunc-7-i386.s: Likewise. * ld-ifunc/ifunc-7-x86-64.s: Likewise.
Diffstat (limited to 'ld/testsuite/ld-ifunc/ifunc-7-i386.s')
-rw-r--r--ld/testsuite/ld-ifunc/ifunc-7-i386.s24
1 files changed, 24 insertions, 0 deletions
diff --git a/ld/testsuite/ld-ifunc/ifunc-7-i386.s b/ld/testsuite/ld-ifunc/ifunc-7-i386.s
new file mode 100644
index 00000000000..8616c4e5d42
--- /dev/null
+++ b/ld/testsuite/ld-ifunc/ifunc-7-i386.s
@@ -0,0 +1,24 @@
+ .text
+ .type foo, %gnu_indirect_function
+.globl foo
+ .type foo, @function
+foo:
+ ret
+ .size foo, .-foo
+ .hidden 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