PR28047, readelf crash due to assertion failure
authorAlan Modra <amodra@gmail.com>
Sat, 3 Jul 2021 00:08:40 +0000 (09:38 +0930)
committerAlan Modra <amodra@gmail.com>
Mon, 5 Jul 2021 10:34:21 +0000 (20:04 +0930)
commit40e1d303cedca7d67f6219686f06b9750659beab
tree416c08ac006b675ef6da56119163e7100e7a1ed0
parent74ace054855321bc5271dd7b354131cd0b71333a
PR28047, readelf crash due to assertion failure

DW_FORM_ref1, DW_FORM_ref2, DW_FORM_ref4, DW_FORM_ref1, and
DW_FORM_ref_udata are all supposed to be within the containing unit.

PR 28047
* dwarf.c (get_type_abbrev_from_form): Add cu_end parameter.
Check DW_FORM_ref1 etc. arg against cu_end rather than end of
section.  Adjust all callers.
binutils/ChangeLog
binutils/dwarf.c