gas: Use DW_FORM_sec_offset for DWARF version 4 or higher.
authorMark Wielaard <mark@klomp.org>
Tue, 1 Sep 2020 13:29:56 +0000 (15:29 +0200)
committerMark Wielaard <mark@klomp.org>
Thu, 3 Sep 2020 16:00:03 +0000 (18:00 +0200)
commitdd216e07a156c19e589fc5f481fe13a256262801
tree7f3660bd2e6bce746fc5a497ab65651c7b92bc9e
parentac267c754cecd2bbbfc71feb9ca8ec84f6754cb4
gas: Use DW_FORM_sec_offset for DWARF version 4 or higher.

Older DWARF versions used DW_FORM_data4 or DW_FORM_data8 for offsets
into sections for e.g. DW_AT_stmt_list ot DW_AT_ranges. But version 4
introduced a dedicated form for such section offsets. Make sure to emit
the proper form for newer DWARF versions.

gas/ChangeLog:

* dwarf2dbg.c (out_debug_abbrev): Use DW_FORM_sec_offset for DWARF
version 4 or higher.
gas/ChangeLog
gas/dwarf2dbg.c