Bug 24756

Summary: Unknown debugging section .debug_addr (-gsplit-dwarf)
Product: dwz Reporter: Matthias Klose <doko>
Component: defaultAssignee: Nobody <nobody>
Status: NEW ---    
Severity: enhancement CC: dwz, jordan, mark, sam, vries
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:

Description Matthias Klose 2019-07-02 10:25:49 UTC
seen with 0.12, and trunk 20190702 on i686-linux-gnu:

$ dwz -mlibpocl2.debug -Mlibpocl2.debug -- libpocl.so.2.2.0 libllvmopencl.so
dwz: libpocl.so.2.2.0: Unknown debugging section .debug_addr
dwz: libllvmopencl.so: Unknown debugging section .debug_addr
dwz: Too few files for multifile optimization

test case at
Comment 1 Tom de Vries 2019-07-02 10:30:33 UTC
This can easily be reproduced with:
$ gcc hello.c -gsplit-dwarf -g -c
$ gcc hello.o -g
$ dwz a.out
dwz: a.out: Unknown debugging section .debug_addr
Comment 2 Mark Wielaard 2019-07-02 10:49:48 UTC
The reproducer in comment #2 is nicer because it will have the .dwo files, which need to somehow be handled.

The testcase from the description has been executables linked with some object files which were compiled with -gsplit-dwarf, because it does have some skeleton units (and a .debug_addr section) but is missing the .dwo files (or .dwp archive) containing the split unit sections. Without the split units you cannot resolve the skeleton units (the split units will refer to the .debug_addr table).