While running the binutils test cases against elftoolchain we
discovered that stripping all sections from an empty .o file results
in a strip segfault. I submitted ticket 463 for this.

I think it should be fine to add the default section names ("",
".symtab", ".strtab", ".shstrtab") to the shstrtab when it is
initialized, rather than upon the addition of the first non-default
entry. This change can be seen in FreeBSD's phabricator at
https://reviews.freebsd.org/D1341

This seems to be the most straightforward approach to me, and I
believe it should be fine since elfcopy and strip only work properly
if the input file has a section header and .shstrtab anyway. Does that
sound reasonable?

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Elftoolchain-developers mailing list
Elftoolchain-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/elftoolchain-developers

Reply via email to