http://sourceware.org/bugzilla/show_bug.cgi?id=12291
Summary: "ld -r" doesn't work with mixed IR/non-IR objects
Product: binutils
Version: 2.22 (HEAD)
Status: NEW
Severity: normal
Priority: P2
Component: ld
AssignedTo: [email protected]
ReportedBy: [email protected]
[...@gnu-6 pr-1]$ cat foo.c
#include <stdio.h>
void foo(void)
{
printf ("hello foo\n");
}
[...@gnu-6 pr-1]$ cat main.c
extern void foo(void);
int main(void)
{
foo();
return 0;
}
[...@gnu-6 pr-1]$ make
/usr/gcc-4.6/bin/gcc -B./ -c -O -flto -fuse-linker-plugin main.c -o main.o
/usr/gcc-4.6/bin/gcc -B./ -c -O foo.c -o foo.o
./ld -r -o prog.o main.o foo.o
/usr/gcc-4.6/bin/gcc -B./ -flto -fuse-linker-plugin prog.o -o prog
/tmp/ccAWLRVh.ltrans0.ltrans.o: In function `main':
ccAWLRVh.ltrans0.o:(.text.startup+0x5): undefined reference to `foo'
collect2: ld returned 1 exit status
make: *** [prog] Error 1
[...@gnu-6 pr-1]$
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-binutils