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]

Re: Help with strip


Garrett Kajmowicz <gkajmowi@tbaytel.net> writes:

> strip -N functionname function.o
...
> 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.

Try compiling with -ffunction-sections and then using
objcopy --discard-sections.

It is in general impossible to splice a single function out of the
middle of a section.

zw


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