From: Ed M. <em...@fr...> - 2014-12-19 15:49:16
|
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? |