[LLVMbugs] [Bug 23390] New: lld produces invalid executable when statically linking against pthread
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri May 1 14:54:08 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=23390
Bug ID: 23390
Summary: lld produces invalid executable when statically
linking against pthread
Product: lld
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: unassignedbugs at nondot.org
Reporter: davide at freebsd.org
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
% cat thread.c
#include <pthread.h>
pthread_mutex_t mtx;
int
main(void)
{
pthread_mutex_lock(&mtx);
return (0);
}
% clang thread.c -o thread -c
% /exps/llvm/build/bin/lld -flavor gnu -Bstatic -o thread /usr/lib/crt1.o
/usr/lib/crti.o /usr/lib/crtbeginT.o -L/usr/lib thread.o -lpthread -lgcc
-lgcc_eh -lc -lgcc -lgcc_eh /usr/lib/crtend.o /usr/lib/crtn.o
% ./thread
Segmentation fault (core dumped)
lldb not really helpful here:
% /exps/llvm/build/bin/lldb ./thread
(lldb) target create "./thread"
Current executable set to './thread' (x86_64).
(lldb) run
Process 37235 launching
Killed
--
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/20150501/6593c62b/attachment.html>
More information about the llvm-bugs
mailing list