summaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-i386/protected4.s
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-03-20 18:16:28 +0000
committerH.J. Lu <hjl.tools@gmail.com>2012-03-20 18:16:28 +0000
commit81eb727e537b076d28fadee710bed6bf49bdc2da (patch)
treed94559973bdfc3d5f18a847704b025976a171f31 /ld/testsuite/ld-i386/protected4.s
parent1a63e03736c60da3a2d0954dcd262c5756308799 (diff)
downloadbinutils-redhat-81eb727e537b076d28fadee710bed6bf49bdc2da.tar.gz
Handle relocation against protected function for -Bsymbolic
bfd/ 2012-03-20 H.J. Lu <hongjiu.lu@intel.com> PR ld/13880 * elf32-i386.c (elf_i386_relocate_section): Don't issue an error for R_386_GOTOFF relocation against protected function if SYMBOLIC_BIND is true. * elf64-x86-64.c (elf_x86_64_relocate_section): Don't issue an error for R_X86_64_GOTOFF64 relocation against protected function when building executable or SYMBOLIC_BIND is true. ld/testsuite/ 2012-03-20 H.J. Lu <hongjiu.lu@intel.com> PR ld/13880 * ld-i386/i386.exp: Run protected4 and protected5. * ld-x86-64/x86-64.exp: Likewise. * ld-i386/protected4.d: New. * ld-i386/protected4.s: Likewise. * ld-i386/protected5.d: Likewise. * ld-i386/protected5.s: Likewise. * ld-x86-64/protected4.d: Likewise. * ld-x86-64/protected4.s: Likewise. * ld-x86-64/protected5.d: Likewise. * ld-x86-64/protected5.s: Likewise.
Diffstat (limited to 'ld/testsuite/ld-i386/protected4.s')
-rw-r--r--ld/testsuite/ld-i386/protected4.s12
1 files changed, 12 insertions, 0 deletions
diff --git a/ld/testsuite/ld-i386/protected4.s b/ld/testsuite/ld-i386/protected4.s
new file mode 100644
index 0000000000..66f2a56dfc
--- /dev/null
+++ b/ld/testsuite/ld-i386/protected4.s
@@ -0,0 +1,12 @@
+ .text
+ .protected foo
+ .globl foo
+ .type foo, @function
+foo:
+ ret
+ .size foo, .-foo
+ .globl bar
+ .type bar, @function
+bar:
+ movl foo@GOTOFF(%ecx), %eax
+ .size bar, .-bar