[llvm-bugs] [Bug 52321] New: s390x: TLS reference in /usr/lib64/libLLVM.so mismatches non-TLS reference in /usr/lib64/libLLVM.so

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Oct 26 04:16:07 PDT 2021


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

            Bug ID: 52321
           Summary: s390x: TLS reference in /usr/lib64/libLLVM.so
                    mismatches non-TLS reference in /usr/lib64/libLLVM.so
           Product: libraries
           Version: trunk
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: SystemZ
          Assignee: unassignedbugs at nondot.org
          Reporter: sarah.kriesch at opensuse.org
                CC: llvm-bugs at lists.llvm.org

We are building applications with LLVM at openSUSE and receiving these problems
with multiple packages, as PostgreSQL and Rust:


/usr/lib64/gcc/s390x-suse-linux/11/../../../../s390x-suse-linux/bin/ld:
@GLIBCXX_3.4.11: TLS reference in /usr/lib64/libLLVM.so mismatches non-TLS
reference in /usr/lib64/libLLVM.so
 /usr/lib64/gcc/s390x-suse-linux/11/../../../../s390x-suse-linux/bin/ld:
/usr/lib64/libLLVM.so: error adding symbols: bad value
 collect2: error: ld returned 1 exit status
make[2]: *** [../../../../src/Makefile.shlib:309: llvmjit.so] Error 1


Here, the symbol for which there are TLS and non-TLS references is mentioned,
it's '@GLIBCXX_3.4.11'.  That is of course not any sensible symbol, it's an
empty symbol name with a symbol version, or the symbol version itself
interpreted as symbol name.

Our guess is that the linker plugin does something strange (aka undefined),
either caused by a problem in llvms use of it, or in ld.  It manipulates the
symbol tables and the above definitely is something strange with the symbol
table.

There are exactly two TLS references in libLLVM.so.12

    23: 0000000000000000     0 TLS     GLOBAL DEFAULT  UND
_ZSt11__once_call at GLIBCXX_3.4.11 (16)
    29: 0000000000000000     0 TLS     GLOBAL DEFAULT  UND
_ZSt15__once_callable at GLIBCXX_3.4.11 (16)

so just speculating that the 'ld' error is bogus and the second reference to
'/usr/lib64/libLLVM.so' should really be to sth else, like an object from the
link command-line as built by

g++ -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-stat
ement -Wendif-labels -Wmissing-format-attribute -Wformat-security
-fno-strict-al
iasing -fwrapv -fexcess-precision=standard -Wno-format-truncation
-Wno-stringop-
truncation -O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector 
-funwind-tables -fasynchronous-unwind-tables  -fPIC -shared -o llvmjit.so 
llvmj
it.o llvmjit_error.o llvmjit_inline.o llvmjit_wrap.o llvmjit_expr.o
llvmjit_defo
rm.o -L../../../../src/port -L../../../../src/common  -flto=auto
-ffat-lto-objec
ts -L/usr/lib64  -Wl,--as-needed  -lLLVM

-- 
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/20211026/1807b598/attachment.html>


More information about the llvm-bugs mailing list