I am running readelf -w on my (C++) executable to examine some debug sections and it prints the following warnings a couple of times:
$ readelf -w a.out
...
readelf: Warning: Corrupt offset (0x00000028) in range entry 1
readelf: Warning: Corrupt offset (0x00000044) in range entry 2
readelf: Warning: Corrupt offset (0x00000054) in range entry 3
...
I have no clue what this means and neither the manpage nor Google could help. Can anyone enlighten me?
The error comes from dwarf.c here:
for (i = 0; i < num_range_list; i++)
...
if (offset > (size_t) (finish - section_begin))
{
warn (_("Corrupt offset (%#" PRIx64 ") in range entry %u\n"),
offset, i);
continue;
}
What this means is hard to say without seeing output from readelf --all. It could be that your compiler is producing bad debug info, but it could also be a bug in readelf, possibly this one.
You could try using eu-readelf from the elfutils package, which appears to be better maintained.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With