This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
removing symbol from partially linked object file
- From: Erik Leunissen <e dot leunissen at hccnet dot nl>
- To: binutils at sourceware dot org
- Date: Wed, 15 Nov 2006 00:00:27 +0100
- Subject: removing symbol from partially linked object file
Why isn't the symbol X removed in this case?
cat a.c
void
X ()
{
}
cat b.c
extern void X();
void
Y ()
{
X();
}
gcc -c a.c b.c
ld -r -nostdlib -o ab.o a.o b.o
/usr/local/src/binutils-2.17/binutils/objcopy -L X ab.o
nm ab.o
00000000 t X
00000008 T Y
/usr/local/src/binutils-2.17/binutils/objcopy -x ab.o
nm ab.o
00000000 t X
00000008 T Y