bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gold/31830] error: y.o: multiple definition of 'foo'


From: cvs-commit at gcc dot gnu.org
Subject: [Bug gold/31830] error: y.o: multiple definition of 'foo'
Date: Sun, 09 Jun 2024 06:58:09 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=31830

--- Comment #3 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by H.J. Lu <hjl@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=89d801850ac03d0531f7eef3d6978bec17a30a2d

commit 89d801850ac03d0531f7eef3d6978bec17a30a2d
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri May 31 21:30:34 2024 -0700

    gold: Properly remove the versioned symbol

    When the versioned symbol foo is removed from the shared library,  the
    ".symver foo,foo@VER" directive provides binary compatibility for foo@VER.
    In this case, the unversioned symbol foo should be hidden and shouldn't
    generate a multiple definition error.

            PR gold/31830
            * resolve.cc (Symbol_table::resolve): Move symbol version handling
            to ...
            * symtab.cc (Symbol_table::add_from_object): Here. If the hidden
            version from .symver is the same as the default version from the
            unversioned symbol, don't make the unversioned symbol the default
            versioned
            symbol.
            * testsuite/Makefile.am (check_SCRIPTS): Add ver_test_pr31830.sh.
            (check_DATA): ver_test_pr31830_a.syms and ver_test_pr31830_b.syms.
            (ver_test_pr31830_a.syms): New.
            (ver_test_pr31830_b.syms): Likewise.
            (ver_test_pr31830_a.so): Likewise.
            (ver_test_pr31830_b.so): Likewise.
            * testsuite/Makefile.in: Regenerated.
            * testsuite/ver_test_pr31830.script: New file.
            * testsuite/ver_test_pr31830.sh: Likewise.
            * testsuite/ver_test_pr31830_a.c: Likewise.
            * testsuite/ver_test_pr31830_b.c: Likewise.
            * testsuite/ver_test_pr31830_lto.c: Likewise.
            * testsuite/ver_test_pr31830_lto.sh: Likewise.

    Signed-off-by: H.J. Lu <hjl.tools@gmail.com>

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]