This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Help with strip
- From: Garrett Kajmowicz <gkajmowi at tbaytel dot net>
- To: binutils at sources dot redhat dot com
- Date: Sat, 18 Dec 2004 12:10:28 -0500
- Subject: Help with strip
- Reply-to: gkajmowi at tbaytel dot net
This is going to sound somewhat odd, but I'm having a hard time getting strip
to do what I want it to do. It might be that I am usign the wrong tool. If
so, please let me know.
Please ignore the fact that this doesn't make a lot of sense - it does, but it
would take al ong time to explain the reasoning for it.
I compile a file which defines a function. It doesn't matter what the
function does.
I then
strip -N functionname function.o
The file is reduced slightly in size. So far, so good.
However, when I run objdump -D function.o, the only visible difference is that
the name of the function has been stripped.
I do not just want to remove the name of a function - I want to remove a
function altogether, including its code.
When the object file is linked into a larger file, I do not want that code to
be included. More precisely, I want that symbol to be considered undefined.
Weak symbols won't do.
Please advise.
- Garrett Kajmowicz