libdwfl: Report core module segment even when NT_FILE build-id doesn't match.

dwfl_segment_report_module can take the NT_FILE note contents to find
the matching file for the module on the file system from the core file.
If the file exists but the build-id didn't match we would not report the
module. But we should just report the module anyway, ignore the file,
and try to match the ELF image another way.

This issue can be replicated by building and running make check in
/tmp/elfutils with run-backtrace-core-aarch64.sh since that core file
includes a NT_FILE note pointing to /tmp/elfutils/tests/backtrace-child.
Which won't match if it was just recompiled.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
2 files changed