Re: PR28149, debug info with wrong file association
authorAlan Modra <amodra@gmail.com>
Mon, 20 Sep 2021 02:00:41 +0000 (11:30 +0930)
committerAlan Modra <amodra@gmail.com>
Mon, 20 Sep 2021 02:08:55 +0000 (11:38 +0930)
commit5b4846283c3d49138a58a3bb4d61ed3e2dfffff4
tree9a3a322a37e0ed2a648a3ce4eecb349beb741f4d
parent8ac439689f4b0e7d0d03805426ae75fafdb47ad5
Re: PR28149, debug info with wrong file association

Fixes segfaults when building aarch64-linux kernel, due to only doing
part of the work necessary when allocating file numbers late.  I'd
missed looping over subsegments, which resulted in some u.filename
entries left around and later interpreted as u.view.

PR 28149
* dwarf2dbg.c (purge_generated_debug): Iterate over subsegs too.
(dwarf2_finish): Call do_allocate_filenum for all subsegs too,
in a separate loop before subsegs are chained.
gas/dwarf2dbg.c