.eh_frame, .eh_frame_hdr - how to remove that trash

Zhihao Yuan lichray at gmail.com
Thu Oct 20 12:24:51 UTC 2011


On Thu, Oct 20, 2011 at 7:13 AM, Dimitry Andric <dim at freebsd.org> wrote:

> On 2011-10-20 12:44, Wojciech Puchar wrote:
>
>> i both don't use C++ and don't want to debug when i am linking final
>> binary.
>>
>> how to turn this off?
>>
>
> objcopy --remove-section .eh_frame_hdr --remove-section .eh_frame
> --remove-section .rel.eh_frame --remove-section .rela.eh_frame
> $your_executable
>

After I done this, the binary size *increased* a lot, while objdump shows
that the content is less. I don't understand.


>
> No warranty for any blown-off extremities, though.
>
> ______________________________**_________________
> freebsd-hackers at freebsd.org mailing list
> http://lists.freebsd.org/**mailman/listinfo/freebsd-**hackers<http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@**
> freebsd.org <freebsd-hackers-unsubscribe at freebsd.org>"
>



-- 
Zhihao Yuan, nickname lichray
The best way to predict the future is to invent it.
___________________________________________________
4BSD -- http://4bsd.biz/


More information about the freebsd-hackers mailing list