https://sourceware.org/bugzilla/show_bug.cgi?id=20104
Bug ID: 20104
Summary: error adding symbols: File format not recognized
Product: binutils
Version: 2.27 (HEAD)
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: hjl.tools at gmail dot com
Target Milestone: ---
With clang 3.9.0 on x86-64, I got
[hjl@gnu-6 opt3]$ cat dummy.c
void
dummy ()
{
}
[hjl@gnu-6 opt3]$ cat live.c
extern void dead ();
void live()
{
dead ();
}
[hjl@gnu-6 opt3]$ cat main.c
void live();
int
_start ()
{
live();
return 0;
}
[hjl@gnu-6 opt3]$ cat dead.c
void dead()
{
}
[hjl@gnu-6 opt3]$ make
/export/build/gnu/llvm-clang-bootstrap/stage3/build-x86_64-linux/bin/clang -c
-flto -o dummy.o dummy.c
/export/build/gnu/llvm-clang-bootstrap/stage3/build-x86_64-linux/bin/clang -c
-flto -o main.o main.c
/export/build/gnu/llvm-clang-bootstrap/stage3/build-x86_64-linux/bin/llvm-ar
scr main.a dummy.o main.o
/export/build/gnu/llvm-clang-bootstrap/stage3/build-x86_64-linux/bin/clang -c
-flto -o dead.o dead.c
/export/build/gnu/llvm-clang-bootstrap/stage3/build-x86_64-linux/bin/llvm-ar
scr dead.a dummy.o dead.o
/export/build/gnu/llvm-clang-bootstrap/stage3/build-x86_64-linux/bin/clang -c
-flto -o live.o live.c
/export/build/gnu/llvm-clang-bootstrap/stage3/build-x86_64-linux/bin/llvm-ar
scr live.a dummy.o live.o
/export/build/gnu/llvm-clang-bootstrap/stage3/build-x86_64-linux/bin/clang -O2
-nostdlib -nostartfiles -fuse-ld=bfd -flto -static -o test1 main.a dead.a
live.a
dead.a: error adding symbols: File format not recognized
clang-3.9: error: linker command failed with exit code 1 (use -v to see
invocation)
Makefile:35: recipe for target 'test1' failed
make: *** [test1] Error 1
rm live.o dummy.o main.o dead.o
[hjl@gnu-6 opt3]$
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils