[llvm-bugs] [Bug 38549] New: After r326641/r326813, error: duplicate symbol 'pdb_search_init' in version script

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Aug 13 12:11:10 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=38549

            Bug ID: 38549
           Summary: After r326641/r326813, error: duplicate symbol
                    'pdb_search_init' in version script
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: ELF
          Assignee: unassignedbugs at nondot.org
          Reporter: dimitry at andric.com
                CC: llvm-bugs at lists.llvm.org

While working on an update to lld 7.0.0 for FreeBSD, I noticed the samba 4.8.3
port wouldn't link libsamba-passdb.so anymore, with:

ld: error: duplicate symbol 'pdb_search_init' in version script

Apparently this is a new error in lld 7.0.0, which has been introduced in
https://reviews.llvm.org/rL326813 ("Improve duplicated version handling"), for
bug 28342.  It was a warning before that, but bisecting shows that the warning
is first printed after https://reviews.llvm.org/rL326641 ("Simplify. NFC"), so
as far as I'm concerned, that revision is definitely *not* NFC. :)

Now, the version script for libsamba-passdb.so, samba-passdb.vscript, looks
like this:

SAMBA_PASSDB_0.2.0 {
        global:
                pdb_getgrsid;
                pdb_get_trusted_domain_by_sid;
[... more symbols ...]
                pdb_search_init;                        [1]
[... more symbols ...]
};

SAMBA_PASSDB_0.24.1 {
        global:
                pdb_get_trusteddom_creds;
} SAMBA_PASSDB_0.2.0;

[... more versions ...]

SAMBA_PASSDB_0.27.0 {
        global:
                *;
        local:
                idmap_init;
                idmap_sids_to_xids;
                idmap_xids_to_sids;
                pdb_nds_*;
                pdb_ldapsam_init*;
                pdb_*_init;                     [2]
[ ... more symbols ... ]
};

As you you may notice, pdb_search_init is in the public 0.2.0 ABI, but it's
*also* in the local ABI via the pdb_*_init wildcard.  Apparently, this was
never noticed before, because BFD ld and earlier lld's didn't check at all.

Is it really a problem that pdb_search_init exists as a global symbol in
version 0.2.0 of the ABI, and as a local symbol in version 0.27.0? 

I think this is a regression inadvertently caused by
https://reviews.llvm.org/rL326641, but if it isn't so, is the problem in the
version script, or in lld?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180813/801ea260/attachment.html>


More information about the llvm-bugs mailing list