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: unassignedb...@nondot.org
          Reporter: dav...@freebsd.org
                CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to