[llvm-bugs] [Bug 28359] New: symbol <symbol> has undefined version <version> errors linking the FreeBSD base system

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jun 29 07:59:36 PDT 2016


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

            Bug ID: 28359
           Summary: symbol <symbol> has undefined version <version> errors
                    linking the FreeBSD base system
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: ELF
          Assignee: unassignedbugs at nondot.org
          Reporter: emaste at freebsd.org
                CC: llvm-bugs at lists.llvm.org
            Blocks: 23214
    Classification: Unclassified

Need to investigate further but submitting now for tracking.

FreeBSD base system build currently fails (when linking
gnu/usr.bin/binutils/as, probably the first target binary) with:
symbol shmctl at FBSD_1.0 has undefined version FBSD_1.0
symbol msgctl at FBSD_1.0 has undefined version FBSD_1.0
symbol swapcontext@@FBSD_1.2 has undefined version FBSD_1.2
... and a couple of dozen more.

The symbols reported here are the backwards compat implementations.

Definition here:

https://svnweb.freebsd.org/base/head/lib/libc/include/compat.h?revision=298830&view=markup

produces this object:

feynman% readelf -s freebsd7_shmctl.o

Symbol table '.symtab' contains 6 entries:
   Num:    Value          Size Type    Bind   Vis      Ndx Name
     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND 
     1: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND .cerror
     2: 0000000000000000    17 FUNC    GLOBAL DEFAULT    2
__sys_freebsd7_shmctl
     3: 0000000000000000    17 FUNC    WEAK   DEFAULT    2 _freebsd7_shmctl
     4: 0000000000000000    17 FUNC    WEAK   DEFAULT    2 freebsd7_shmctl
     5: 0000000000000000    17 FUNC    WEAK   DEFAULT    2 shmctl at FBSD_1.0

which ends up with this symbol in the linked .so:

feynman% readelf -s libc.so.7 | grep 'shmctl.*FBSD_1.0'
  2033: 0000000000086c30    17 FUNC    WEAK   DEFAULT   17 shmctl at FBSD_1.0

but it looks like this symbol ends up with the default FBSDprivate_1.0 symbol
version, not FBSD_1.0:

feynman% readelf -V libc.so.7
...
  71c:   5 (FBSD_1.3)      7 (FBSDprivate_1.0)     7 (FBSDprivate_1.0)     7
(FBSDprivate_1.0)  
...

-- 
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/20160629/b6f338cc/attachment.html>


More information about the llvm-bugs mailing list