[binutils] Handle DW_FORM_ref_sig8 in get_type_abbrev_from_form
authorTom de Vries <tdevries@suse.de>
Tue, 9 Feb 2021 14:37:24 +0000 (15:37 +0100)
committerTom de Vries <tdevries@suse.de>
Tue, 9 Feb 2021 14:37:24 +0000 (15:37 +0100)
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.

binutils/ChangeLog:

2021-02-09  Tom de Vries  <tdevries@suse.de>

PR binutils/27370
* dwarf.c (get_type_abbrev_from_form): Handle DW_FORM_ref_sig8.

binutils/ChangeLog
binutils/dwarf.c

index 0f07cd42eaf7093bdb92a4081a638badcd2871c2..0e59683d4226dad6d6d1a4f06d680045dfabae5e 100644 (file)
@@ -1,3 +1,8 @@
+2021-02-09  Tom de Vries  <tdevries@suse.de>
+
+       PR binutils/27370
+       * dwarf.c (get_type_abbrev_from_form): Handle DW_FORM_ref_sig8.
+
 2021-02-09  Tom de Vries  <tdevries@suse.de>
 
        PR binutils/27386
index 6797dd158d64f56e1c5f9073da8f981f46454408..d6eb8926dbfdffb5cbd923a328149893bfb13df5 100644 (file)
@@ -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;
 
This page took 0.029867 seconds and 4 git commands to generate.