[LLVMbugs] [Bug 17025] New: [PATCH] Undefined reference in Nolibc build of sanitizers
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Aug 28 10:03:08 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=17025
Bug ID: 17025
Summary: [PATCH] Undefined reference in Nolibc build of
sanitizers
Product: compiler-rt
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: compiler-rt
Assignee: unassignedbugs at nondot.org
Reporter: willdtz at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 11111
--> http://llvm.org/bugs/attachment.cgi?id=11111&action=edit
Proposed patch to avoid compiler-generated memset
Looks like my compiler finds sanitizer code to rewrite to memset() which
results in an undefined reference when attempting to build without libc:
FAILED: cd
/home/will/llvm/34-obj/projects/compiler-rt/lib/sanitizer_common/tests &&
/home/will/llvm/34-obj/bin/clang sanitizer_nolibc_test_main.x86_64.o
-Wl,-whole-archive libRTSanitizerCommon.test.nolibc.x86_64.a
-Wl,-no-whole-archive -o
/home/will/llvm/34-obj/projects/compiler-rt/lib/sanitizer_common/tests/Sanitizer-x86_64-Test-Nolibc
-nostdlib -m64
libRTSanitizerCommon.test.nolibc.x86_64.a(sanitizer_libc.cc.o): In function
`__sanitizer::internal_strncpy(char*, char const*, unsigned long)':
/home/will/llvm/34-src/projects/compiler-rt/lib/sanitizer_common/sanitizer_libc.cc:156:
undefined reference to `memset'
clang-3.3: error: linker command failed with exit code 1 (use -v to see
invocation)
The attached patch resolves the issue by leveraging the existing
internal_memset implementation.
--
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/20130828/59d6c28b/attachment.html>
More information about the llvm-bugs
mailing list