[Bug 610992] Re: clang -fstack-protector fails to link (undefined reference to `__stack_chk_guard')

Matthias Klose matthias.klose at canonical.com
Mon Aug 16 15:10:23 UTC 2010


there are two test failures in the llvm testsuite with this patch:

Running /scratch/packages/llvm/llvm-2.7-2.7/test/CodeGen/Generic/dg.exp ...
FAIL: /scratch/packages/llvm/llvm-2.7-2.7/test/CodeGen/Generic/stack-protector.ll: 
Does not have a RUN line

Running /scratch/packages/llvm/llvm-2.7-2.7/test/CodeGen/X86/dg.exp ...
FAIL: /scratch/packages/llvm/llvm-2.7-2.7/test/CodeGen/X86/stack-protector.ll
Failed with exit(1) at line 1
while running:  llc -march=x86 < /scratch/packages/llvm/llvm-2.7-2.7/test/CodeGen/X86/stack-protector.ll -o 
- | /bin/grep {__stack_chk_guard}
child process exited abnormally

-- 
clang -fstack-protector fails to link (undefined reference to `__stack_chk_guard')
https://bugs.launchpad.net/bugs/610992
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is a direct subscriber.

Status in The Low Level Virtual Machine Compiler Infrastructure: Unknown
Status in “llvm-2.7” package in Ubuntu: New
Status in “llvm-2.7” package in Debian: Unknown

Bug description:
Binary package hint: clang

$ echo 'int main(){char s[80];}' > test.c
$ gcc -fstack-protector test.c -o test
$ ./test
$ clang -fstack-protector test.c -o test
/usr/bin/ld: /tmp/cc-0Rbhby.o: in function main:test.c(.text+0xc): error: undefined reference to '__stack_chk_guard'
/usr/bin/ld: /tmp/cc-0Rbhby.o: in function main:test.c(.text+0x22): error: 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)






More information about the Ubuntu-sponsors mailing list