The problem seems to be that l_name, l_ld and l_addr loaded from the
dump in report_r_debug all end up being zero.
Ok. I made it check for 0 and just ignore such entries.
With l_ld of 0 we find nothing, dwfl_addrsegment returns -1, and
report_r_debug then returns with an error. The comment ("_If_
content-sniffing") makes me think that not finding a module is not fact
the end of the world. So report_r_debug should tolerate it, and only
bail out, when dwfl_addrsegment really ended with an error.
It is true that this is a non-fatal situation. The raw ELF header sniffing
finds all the modules it can. Looking at link_map just gives them better
names and the proper ordering.
The only failure dwfl_addrsegment can really have is being out of memory,
which is probably not even possible here in practice (reify_segments will
have been done already because of some other lookup). So I've made it just
ignore failures there.
Thanks,
Roland