Help with strip
Zack Weinberg
zack@codesourcery.com
Sat Dec 18 18:38:00 GMT 2004
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
More information about the Binutils
mailing list