This is the mail archive of the binutils@sources.redhat.com 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]

Help with strip


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


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