diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2010-01-08 03:03:16 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2010-01-08 03:03:16 +0000 |
commit | d023c380db01abd7f6f2a53edecca09488b53982 (patch) | |
tree | dc372f631a948d1fd15c1a9d7518befe5ec4a316 /bfd/elflink.c | |
parent | bde6f3eb6dff94cea1d471e15c6154d55d49820f (diff) | |
download | gdb-d023c380db01abd7f6f2a53edecca09488b53982.zip gdb-d023c380db01abd7f6f2a53edecca09488b53982.tar.gz gdb-d023c380db01abd7f6f2a53edecca09488b53982.tar.bz2 |
Fix PR ld/11138
bfd/
2010-01-07 H.J. Lu <hongjiu.lu@intel.com>
PR ld/11138
* elflink.c (elf_link_check_versioned_symbol): Don't abort if
a symbol referenced by DSO is is defined in a non-shared object
and forced local.
ld/testsuite/
2010-01-07 H.J. Lu <hongjiu.lu@intel.com>
PR ld/11138
* ld-elf/pr11138-1.c: New.
* ld-elf/pr11138-1.map: Likewise.
* ld-elf/pr11138-2.c: Likewise.
* ld-elf/pr11138-2.map: Likewise.
* ld-elf/pr11138.out: Likewise.
* ld-elf/shared.exp (build_tests): Add libpr11138-1.so and
libpr11138-2.o.
(run_tests): Add 2 tests for PR ld/11138.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r-- | bfd/elflink.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c index f9f804d..24d8702 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -8492,10 +8492,14 @@ elf_link_check_versioned_symbol (struct bfd_link_info *info, _bfd_elf_swap_versym_in (input, ever, &iver); - if ((iver.vs_vers & VERSYM_HIDDEN) == 0) + if ((iver.vs_vers & VERSYM_HIDDEN) == 0 + && !(h->def_regular + && h->forced_local)) { /* If we have a non-hidden versioned sym, then it should - have provided a definition for the undefined sym. */ + have provided a definition for the undefined sym unless + it is defined in a non-shared object and forced local. + */ abort (); } |