[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/14698] New: ar, nm and ranlib don't use gcc's liblto_plugi
From: |
markus at trippelsdorf dot de |
Subject: |
[Bug binutils/14698] New: ar, nm and ranlib don't use gcc's liblto_plugin.so in BINDIR/../lib/bfd-plugins automatically |
Date: |
Thu, 11 Oct 2012 07:37:12 +0000 |
http://sourceware.org/bugzilla/show_bug.cgi?id=14698
Bug #: 14698
Summary: ar, nm and ranlib don't use gcc's liblto_plugin.so in
BINDIR/../lib/bfd-plugins automatically
Product: binutils
Version: 2.24 (HEAD)
Status: NEW
Severity: normal
Priority: P2
Component: binutils
AssignedTo: address@hidden
ReportedBy: address@hidden
Classification: Unclassified
ar, nm and ranlib use the LLVMgold.so plugin automatically,
it it is found in BINDIR/../lib/bfd-plugins.
(/usr/x86_64-pc-linux-gnu/binutils-bin/lib/bfd-plugins on my system)
Unfortunately gcc's liblto_plugin is loaded automatically.
address@hidden test % cat a.c
#include <stdio.h>
extern void foo1(void);
extern void foo4(void);
void foo2(void) {
printf("Foo2\n");
}
void foo3(void) {
foo4();
}
int main(void) {
foo1();
}
address@hidden test % clang -flto -c a.c -o a.o
address@hidden test % nm a.o
nm: a.o: File format not recognized
address@hidden test % sudo cp /usr/local/lib64/LLVMgold.so
/usr/x86_64-pc-linux-gnu/binutils-bin/lib/bfd-plugins
address@hidden test % nm a.o
U foo1
00000000 T foo2
00000000 T foo3
U foo4
00000000 T main
U printf
address@hidden test % sudo rm
/usr/x86_64-pc-linux-gnu/binutils-bin/lib/bfd-plugins/LLVMgold.so
address@hidden test % gcc -fno-fat-lto-objects -flto a.c -c -o a.o
address@hidden test % nm a.o
0000000000000001 C __gnu_lto_slim
0000000000000001 C __gnu_lto_v1
address@hidden test % sudo cp
/usr/libexec/gcc/x86_64-pc-linux-gnu/4.8.0/liblto_plugin.so.0.0.0
/usr/x86_64-pc-linux-gnu/binutils-bin/lib/bfd-plugins
address@hidden test % nm a.o
0000000000000001 C __gnu_lto_slim
0000000000000001 C __gnu_lto_v1
It would output the following if the gcc lto-plugin would be loaded
automatically:
address@hidden test % nm a.o
U foo1
00000000 T foo2
00000000 T foo3
U foo4
00000000 T main
A fix was posted at:
http://sourceware.org/ml/binutils/2012-10/msg00080.html
--
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.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug binutils/14698] New: ar, nm and ranlib don't use gcc's liblto_plugin.so in BINDIR/../lib/bfd-plugins automatically,
markus at trippelsdorf dot de <=