On 02/25/2014 01:43 AM, Florian Weimer wrote: > On 02/24/2014 05:54 PM, Mark Wielaard wrote: > >>> Is there a reliable way to recognize separate debugging information? >>> Then I could avoid extracting data from phdrs. >> >> I looked a bit into this and I don't see any way to detect that the >> phdrs are invalid, unless you already know this is a separate debuginfo >> file and not a real/valid ELF file. > > Could you change the debuginfo extraction to clearly mark the resulting > ELF files as separate debuginfo? This would help dealing with this in > the future.
And/or, could the debuginfo extraction keep the .interp section? The rest of the phdr offsets would still be meaningless, of course, but INTERP/.interp is both tiny and useful. FWIW, binutils' readelf prints corrupt INTERP from debuginfo too.
