https://llvm.org/bugs/show_bug.cgi?id=23688
Bug ID: 23688
Summary: clang does not pass '-r' to linker in some cases.
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
cat f.c
int foo(){
return 1;
}
clang -c f.c -o f.o
clang -nostdlib -r f.o -o b.o
clang-3.7: warning: argument unused during compilation: '-r'
/usr/x86_64-pc-linux-gnu/binutils-bin/2.24/ld.bfd.real: warning: cannot find
entry symbol _start; defaulting to 00000000004000f0
readelf b.o -h
Type: EXEC (Executable file)
If I run
gcc -nostdlib -r f.o -o b.o
If does not show such warning message and the elf type is
Type: REL (Relocatable file)
So the '-r' is supposed to pass to the linker instead of clang itself.
--
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