diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2015-10-12 04:55:24 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2015-10-12 04:57:16 -0700 |
commit | 4373f8af3ddbc301227e883d5cbed8302c107e59 (patch) | |
tree | 8f393f237c1b03f93a1bb47cc5ab07e89aef71d4 /bfd/elflink.c | |
parent | ede77e6963d1fa748fed1515d58f26e842a2cccb (diff) | |
download | gdb-4373f8af3ddbc301227e883d5cbed8302c107e59.zip gdb-4373f8af3ddbc301227e883d5cbed8302c107e59.tar.gz gdb-4373f8af3ddbc301227e883d5cbed8302c107e59.tar.bz2 |
Skip the unversioned definition after the default version
We may see an unversioned definition after the default version. We
should skip the unversioned definition in this case.
bfd/
PR ld/19073
* elflink.c (_bfd_elf_add_default_symbol): Skip the unversioned
definition after the default version.
ld/testsuite/
PR ld/19073
* ld-elf/pr19073.map: New file.
* ld-elf/pr19073.rd: Likewise.
* ld-elf/pr19073.s: Likewise.
* ld-elf/shared.exp (build_tests): Add tests for PR ld/19073.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r-- | bfd/elflink.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c index 94bb710..839cebb 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -1715,6 +1715,13 @@ _bfd_elf_add_default_symbol (bfd *abfd, h->versioned = versioned; } } + else + { + /* PR ld/19073: We may see an unversioned definition after the + default version. */ + if (p == NULL) + return TRUE; + } bed = get_elf_backend_data (abfd); collect = bed->collect; |