Browse Source
We should change the default symbol for the versioned symbol only when not performing a relocatable link. bfd/ PR ld/18735 * elflink.c (_bfd_elf_add_default_symbol): Add the default symbol if not performing a relocatable link. (elf_link_add_object_symbols): Adjust the default symbol if not performing a relocatable link. ld/testsuite/ PR ld/18735 * ld-elf/pr18735.d: New file. * ld-elf/pr18735.s: Likewise.users/ARM/embedded-binutils-2_26-branch
5 changed files with 52 additions and 9 deletions
@ -0,0 +1,10 @@ |
|||
#ld: -r |
|||
#readelf: -s |
|||
|
|||
Symbol table '.symtab' contains .* entries: |
|||
#... |
|||
[ ]*[0-9]+: [0-9a-fA-F]* +1 +OBJECT +GLOBAL +DEFAULT +[0-9]+ +foo@FOO |
|||
[ ]*[0-9]+: [0-9a-fA-F]* +1 +OBJECT +GLOBAL +DEFAULT +[0-9]+ +bar@@FOO |
|||
[ ]*[0-9]+: [0-9a-fA-F]* +1 +OBJECT +GLOBAL +DEFAULT +[0-9]+ +foo |
|||
[ ]*[0-9]+: [0-9a-fA-F]* +1 +OBJECT +GLOBAL +DEFAULT +[0-9]+ +bar |
|||
#pass |
|||
@ -0,0 +1,13 @@ |
|||
.data |
|||
.symver foo, foo@FOO |
|||
.symver bar, bar@@FOO |
|||
.globl foo |
|||
.type foo, %object |
|||
foo: |
|||
.byte 0 |
|||
.size foo, .-foo |
|||
.globl bar |
|||
.type bar, %object |
|||
bar: |
|||
.byte 0 |
|||
.size bar, .-bar |
|||
Loading…
Reference in new issue