[binutils] Handle DW_UT_skeleton/split_compile in process_debug_info
authorTom de Vries <tdevries@suse.de>
Tue, 9 Feb 2021 13:27:28 +0000 (14:27 +0100)
committerTom de Vries <tdevries@suse.de>
Tue, 9 Feb 2021 13:27:28 +0000 (14:27 +0100)
commit9b87f84a3513c852eca395e3aa47081ef2f12e60
tree9b9a922e6b0b01cd8bfb7cfba84109ef4edcac3a
parenta57d17732eba20c7ebeaabd023e2f0816fb095f6
[binutils] Handle DW_UT_skeleton/split_compile in process_debug_info

With this exec:
...
$ gcc -gsplit-dwarf hello.c -gdwarf-5
...
we run into:
...
$ readelf -w a.out > READELF
readelf: Warning: CU at offset c7 contains corrupt or unsupported unit type: 4.
readelf: Warning: CU at offset c7 contains corrupt or unsupported unit type: 4.
...

Fix this by handling DW_UT_skeleton and DW_UT_split_compile in
process_debug_info.

Note that this just adds the parsing of DWO_id, but not yet any printing of
it.

Tested on x86_64-linux.

binutils/ChangeLog:

2021-02-09  Tom de Vries  <tdevries@suse.de>

PR binutils/27386
* dwarf.c (process_debug_info): Handling DW_UT_skeleton and
DW_UT_split_compile.
binutils/ChangeLog
binutils/dwarf.c