http://llvm.org/bugs/show_bug.cgi?id=6917
Summary: clang -fstack-protector doesn't work
Product: clang
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
-fstack-protector doesn't work
$ cat >x.c <<EOF
int main()
{
char buf[4096];
return 0;
}
EOF
$ clang -fstack-protector x.c
/tmp/cc-5HBV9O.o: In function `main':
x.c:(.text+0xf): undefined reference to `__stack_chk_guard'
x.c:(.text+0x2c): undefined reference to `__stack_chk_guard'
collect2: ld returned 1 exit status
clang: error: linker command failed with exit code 1 (use -v to see invocation)
It looks like it is using the wrong symbols, because gcc creates this:
U __stack_chk_fail
0000000000000000 T main
No reference to __stack_chk_guard.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs