This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]