[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/13298] New: ar --plugin doesn't work on mixed IR/non-IR i
From: |
hjl.tools at gmail dot com |
Subject: |
[Bug binutils/13298] New: ar --plugin doesn't work on mixed IR/non-IR input |
Date: |
Fri, 14 Oct 2011 18:39:56 +0000 |
http://sourceware.org/bugzilla/show_bug.cgi?id=13298
Bug #: 13298
Summary: ar --plugin doesn't work on mixed IR/non-IR input
Product: binutils
Version: 2.23 (HEAD)
Status: NEW
Severity: normal
Priority: P2
Component: binutils
AssignedTo: address@hidden
ReportedBy: address@hidden
Classification: Unclassified
address@hidden slim-1]$ cat main.c
extern int bar ();
int
main ()
{
return bar ();
}
address@hidden slim-1]$ cat xxx.c
int
xxx ()
{
return 0;
}
address@hidden slim-1]$ cat bar.c
extern int xxx ();
int bar (void)
{
return xxx ();
}
address@hidden slim-1]$ make
/usr/gcc-4.7.0-x32/bin/gcc -c -o main.o main.c
/usr/gcc-4.7.0-x32/bin/gcc -flto -c -o xxx.o xxx.c
/usr/gcc-4.7.0-x32/bin/gcc -c -o bar.o bar.c
ld -r -o rel.o xxx.o bar.o
ar --plugin
/usr/gcc-4.7.0-x32/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/liblto_plugin.so
-rcsD lib.a rel.o
/usr/gcc-4.7.0-x32/bin/gcc -flto -o x main.o lib.a
main.o: In function `main':
main.c:(.text+0xa): undefined reference to `bar'
collect2: error: ld returned 1 exit status
make: *** [x] Error 1
address@hidden slim-1]$
..
Without --plugin, it works fine:
address@hidden slim-1]$ rm lib.a
address@hidden slim-1]$ make
ar -rcsD lib.a rel.o
/usr/gcc-4.7.0-x32/bin/gcc -flto -o x main.o lib.a
address@hidden slim-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/13298] New: ar --plugin doesn't work on mixed IR/non-IR input,
hjl.tools at gmail dot com <=