diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2016-02-24 15:13:35 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2016-02-24 15:13:48 -0800 |
commit | 0f550b3df1d4ae31d12505cf93981313c9c6dd25 (patch) | |
tree | 854ccf6e75c3ec01fe29f0594669c0c1d89b7d1e /ld/testsuite | |
parent | e7ad2f145c05bc60b1cd2796c8f3b72f02e3e730 (diff) | |
download | fsf-binutils-gdb-0f550b3df1d4ae31d12505cf93981313c9c6dd25.zip fsf-binutils-gdb-0f550b3df1d4ae31d12505cf93981313c9c6dd25.tar.gz fsf-binutils-gdb-0f550b3df1d4ae31d12505cf93981313c9c6dd25.tar.bz2 |
Update symbol version for symbol from linker script
We need to update symbol version for symbols from linker script.
bfd/
PR ld/19698
* elflink.c (bfd_elf_record_link_assignment): Set versioned if
symbol version is unknown.
ld/
PR ld/19698
* testsuite/ld-elf/pr19698.d: New file.
* testsuite/ld-elf/pr19698.s: Likewise.
* testsuite/ld-elf/pr19698.t: Likewise.
Diffstat (limited to 'ld/testsuite')
-rw-r--r-- | ld/testsuite/ld-elf/pr19698.d | 10 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/pr19698.s | 5 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/pr19698.t | 11 |
3 files changed, 26 insertions, 0 deletions
diff --git a/ld/testsuite/ld-elf/pr19698.d b/ld/testsuite/ld-elf/pr19698.d new file mode 100644 index 0000000..a39f67a --- /dev/null +++ b/ld/testsuite/ld-elf/pr19698.d @@ -0,0 +1,10 @@ +#ld: -shared $srcdir/$subdir/pr19698.t +#readelf : --dyn-syms --wide +#target: *-*-linux* *-*-gnu* *-*-solaris* + +Symbol table '\.dynsym' contains [0-9]+ entries: +#... + +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +FUNC +GLOBAL +DEFAULT +[0-9]+ +foo@VERS.1 +#... + +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +FUNC +GLOBAL +DEFAULT +[0-9]+ +foo@@VERS.2 +#pass diff --git a/ld/testsuite/ld-elf/pr19698.s b/ld/testsuite/ld-elf/pr19698.s new file mode 100644 index 0000000..875dca4 --- /dev/null +++ b/ld/testsuite/ld-elf/pr19698.s @@ -0,0 +1,5 @@ + .text + .globl foo + .type foo, %function +foo: + .byte 0 diff --git a/ld/testsuite/ld-elf/pr19698.t b/ld/testsuite/ld-elf/pr19698.t new file mode 100644 index 0000000..09d9125 --- /dev/null +++ b/ld/testsuite/ld-elf/pr19698.t @@ -0,0 +1,11 @@ +"foo@VERS.1" = foo; + +VERSION { +VERS.2 { + global: + foo; +}; + +VERS.1 { +}; +} |