From patchwork Tue Feb 9 14:25:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Handle DW_FORM_ref_sig8 in get_type_abbrev_from_form X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 48722 Message-Id: <20210209142532.GA32644@delia> To: binutils@sourceware.org Date: Tue, 9 Feb 2021 15:25:33 +0100 From: Tom de Vries List-Id: Binutils mailing list Hi, When compiling an exec like this: ... $ gcc -fdebug-types-section hello.c -gdwarf-5 ... we run into: ... $ readelf -w a.out > READELF readelf: Warning: Unexpected form 20 encountered whilst finding \ abbreviation for type ... Fix this by handling DW_FORM_ref_sig8 conservatively in get_type_abbrev_from_form. OK for trunk? Thanks, - Tom [binutils] Handle DW_FORM_ref_sig8 in get_type_abbrev_from_form binutils/ChangeLog: 2021-02-09 Tom de Vries PR binutils/27370 * dwarf.c (get_type_abbrev_from_form): Handle DW_FORM_ref_sig8. --- binutils/dwarf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/binutils/dwarf.c b/binutils/dwarf.c index 6797dd158d6..d6eb8926dbf 100644 --- a/binutils/dwarf.c +++ b/binutils/dwarf.c @@ -2117,6 +2117,7 @@ get_type_abbrev_from_form (unsigned long form, switch (form) { case DW_FORM_GNU_ref_alt: + case DW_FORM_ref_sig8: /* FIXME: We are unable to handle this form at the moment. */ return NULL;