aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-x86-64/pr23194.s
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2018-05-18 14:23:41 -0700
committerH.J. Lu <hjl.tools@gmail.com>2018-05-18 14:34:49 -0700
commit97373b2eba6077d5059370a95931b93a8b118813 (patch)
tree299609e5c161b68ae98cb1c21858f4096292cd6e /ld/testsuite/ld-x86-64/pr23194.s
parent941036f4ffb95a553fd1a0c44313d72ddcf5cbf0 (diff)
downloadfsf-binutils-gdb-97373b2eba6077d5059370a95931b93a8b118813.zip
fsf-binutils-gdb-97373b2eba6077d5059370a95931b93a8b118813.tar.gz
fsf-binutils-gdb-97373b2eba6077d5059370a95931b93a8b118813.tar.bz2
x86: Don't set eh->local_ref to 1 for versioned symbol
bfd_hide_sym_by_version can't be used to check if a versioned symbol is hidden. It has to be synced with _bfd_elf_link_assign_sym_version to get the correct answer. bfd/ PR ld/23194 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't set eh->local_ref to 1 if a symbol is versioned and there is a version script. ld/ PR ld/23194 * testsuite/ld-i386/i386.exp: Run pr23194. * testsuite/ld-x86-64/x86-64.exp: Likewise. * testsuite/ld-i386/pr23194.d: New file. * testsuite/ld-i386/pr23194.map: Likewise. * testsuite/ld-i386/pr23194.s: Likewise. * testsuite/ld-x86-64/pr23194.d: Likewise. * testsuite/ld-x86-64/pr23194.map: Likewise. * testsuite/ld-x86-64/pr23194.s: Likewise.
Diffstat (limited to 'ld/testsuite/ld-x86-64/pr23194.s')
-rw-r--r--ld/testsuite/ld-x86-64/pr23194.s12
1 files changed, 12 insertions, 0 deletions
diff --git a/ld/testsuite/ld-x86-64/pr23194.s b/ld/testsuite/ld-x86-64/pr23194.s
new file mode 100644
index 0000000..277c19d
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pr23194.s
@@ -0,0 +1,12 @@
+ .text
+ .symver foo,foo@FOO
+ .globl foo
+ .type foo, @function
+foo:
+ ret
+ .size foo, .-foo
+ .globl bar
+ .type bar, @function
+bar:
+ jmp *foo@GOTPCREL(%rip)
+ .size bar, .-bar