diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2015-07-30 03:27:44 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2015-07-30 03:28:00 -0700 |
commit | c6e8a9a802bcd3a96ef14b6ea1b6cd60d5d8d065 (patch) | |
tree | 2f89635eb9cf57993817771a73573a5e1fcc72a3 /ld | |
parent | 13be649613bb62e75296d1f69a7c889ddf29a564 (diff) | |
download | gdb-c6e8a9a802bcd3a96ef14b6ea1b6cd60d5d8d065.zip gdb-c6e8a9a802bcd3a96ef14b6ea1b6cd60d5d8d065.tar.gz gdb-c6e8a9a802bcd3a96ef14b6ea1b6cd60d5d8d065.tar.bz2 |
Don't change the default symbol for relocatable link
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.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/pr18735.d | 10 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/pr18735.s | 13 |
3 files changed, 29 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 267361f..c35d4a7 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2015-07-30 H.J. Lu <hongjiu.lu@intel.com> + + PR ld/18735 + * ld-elf/pr18735.d: New file. + * ld-elf/pr18735.s: Likewise. + 2015-07-29 H.J. Lu <hongjiu.lu@intel.com> * ld-elf/pr18718.c (bar): Use noclone attribute only for GCC diff --git a/ld/testsuite/ld-elf/pr18735.d b/ld/testsuite/ld-elf/pr18735.d new file mode 100644 index 0000000..8ec0938 --- /dev/null +++ b/ld/testsuite/ld-elf/pr18735.d @@ -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 diff --git a/ld/testsuite/ld-elf/pr18735.s b/ld/testsuite/ld-elf/pr18735.s new file mode 100644 index 0000000..aae609d --- /dev/null +++ b/ld/testsuite/ld-elf/pr18735.s @@ -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 |