https://sourceware.org/bugzilla/show_bug.cgi?id=27391
Bug ID: 27391 Summary: [readelf] Handle absolute DW_AT_dwo_name Product: binutils Version: 2.37 (HEAD) Status: NEW Severity: normal Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: vries at gcc dot gnu.org Target Milestone: --- With the fission-mix executable from the gdb testsuite, I run into: ... $ ~/binutils/install/bin/readelf -w fission-mix > READELF readelf: Warning: Unable to load dwo file: /home/vries/gdb_versions/devel/build/gdb/testsuite//home/vries/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.dwarf2/fission-mix/fission-mix2.dwo ... At the start we find: ... The .debug_info section contains link(s) to dwo file(s): Name: /home/vries/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.dwarf2/fission-mix/fission-mix2.dwo Directory: /home/vries/gdb_versions/devel/build/gdb/testsuite ID: <not specified> ... and later-on the part from where we get this info: ... Compilation Unit @ offset 0x176: Length: 0x31 (32-bit) Version: 5 Unit Type: DW_UT_skeleton (4) Abbrev Offset: 0xfd Pointer Size: 8 <0><18a>: Abbrev Number: 1 (DW_TAG_skeleton_unit) <18b> DW_AT_low_pc : 0x4004cf <193> DW_AT_high_pc : 0x15 <19b> DW_AT_stmt_list : 0x14d <19f> DW_AT_dwo_name : /home/vries/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.dwarf2/fission-mix/fission-mix2.dwo <1a3> DW_AT_comp_dir : /home/vries/gdb_versions/devel/build/gdb/testsuite <1a7> DW_AT_GNU_pubnames: 1 <1a7> DW_AT_addr_base : 0x8 ... In the dwarf-5 standard we read: ... A skeleton compilation unit has a DW_AT_dwo_name attribute: 1. A DW_AT_dwo_name attribute whose value is a null-terminated string containing the full or relative path name (relative to the value of the DW_AT_comp_dir attribute, see below) of the object file that contains the full compilation unit. ... So, the name only needs to be prefixed with the dir if it's relative. In this case, the name is already absolute and readelf shouldn't try to add the dir prefix. -- You are receiving this mail because: You are on the CC list for the bug.