[BUG Report] objdump on mingw64 does not display debug_rnglists properly

Neeraj Singh nksingh85@gmail.com
Sun Nov 28 23:34:14 GMT 2021


Hi binutils community,
I'm attempting to use objdump against a git.exe built by the mingw64
toolset using gcc-11.2. The git executable is shared at
https://drive.google.com/file/d/1dp85IqRX8n5ieoB6rLUvOd0Mbo4_AfoV/view?usp=sharing.

There's one minor problem that I was able to address:
binutils\dwarf.c:display_debug_ranges and
display_debug_rnglists_list/display_debug_ranges_list should be using
dwarf_vma for base_address rather than unsigned long. The size of
these two types differ on LLP64 platforms, like mingw64.

There's another problem that I didn't understand: in
display_debug_ranges we use the .debug_rnglists header to compute
"initial_length" and set "finish" to "start+initial_length".  That
logic doesn't seem right for an executable which has a .debug_rnglists
containing ranges from multiple compile units. I'm not sure how this
works correctly on ELF platforms (thought it seems like it does).  I
think the right fix is to just leave "finish" set to the end of the
section rather than using the value from the debug_rnglists header.

Thanks,
Neeraj Singh
Windows Core Filesystems.


More information about the Binutils mailing list