[llvm-bugs] [Bug 28218] New: [LTO] Undefined symbols reported when linking old gas(1) on FreeBSD

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jun 20 13:39:44 PDT 2016


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

            Bug ID: 28218
           Summary: [LTO] Undefined symbols reported when linking old
                    gas(1) on FreeBSD
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: davide at freebsd.org
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

$ sh link.sh
undefined symbol: __libc_allocate_tls
undefined symbol: __malloc
undefined symbol: __calloc
undefined symbol: __realloc
undefined symbol: __free
undefined symbol: _thread_autoinit_dummy_decl_stub
undefined symbol: __clock_gettime
undefined symbol: __raise


$ nm -print-armap ./libc.a |grep __malloc
__malloc in jemalloc_jemalloc.o
[...]
                 U __malloc
---------------- T __malloc

The output of llvm-dis on jemalloc_jemalloc.o shows:

module asm ".weak malloc"
module asm ".equ malloc, __malloc"

; Function Attrs: nounwind sspstrong uwtable
define noalias i8* @__malloc(i64 %size) #0 {
entry:
  %tsdn = alloca %struct.tsdn_s*, align 8
  %usize = alloca i64, align 8
  %ut = alloca %struct.malloc_utrace_t, align 8
[...]

Repro coming (bugzilla doesn't like large attachments)

-- 
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/20160620/84facc98/attachment.html>


More information about the llvm-bugs mailing list