bad patch - also not on list?

Nick Clifton nickc@redhat.com
Mon Nov 20 14:32:40 GMT 2023


Hi Tom,

> I noticed that this commit:
> 
> commit b05efa39b47995db08c5537e4504271c8727702a

> ... removes several hunks from display_gdb_index, causing readelf to be
> incapable of reading v9 indices.

Ah, I did notice that and wonder.

> I think this was probably done in error.

I think so.  It looks like it might be just one delta that is causing
the problem:


@@ -10934,33 +10788,6 @@ display_gdb_index (struct dwarf_section *section,
  	}
      }

-  if (version >= 9)
-    {
-      printf (_("\nShortcut table:\n"));
-
-      if (shortcut_table_offset + 8 > constant_pool_offset)
-	{
-	  warn (_("Corrupt shortcut table in the %s section.\n"), section->name);
-	  return 0;
-	}
-
-      uint32_t lang = byte_get_little_endian (shortcut_table, 4);
-      printf (_("Language of main: "));
-      display_lang (lang);
-      printf ("\n");
-
-      uint32_t name_offset = byte_get_little_endian (shortcut_table + 4, 4);
-      printf (_("Name of main: "));
-      if (name_offset >= section->size - constant_pool_offset)
-	{
-	  printf (_("<corrupt offset: %x>\n"), name_offset);
-	  warn (_("Corrupt name offset of 0x%x found for name of main\n"),
-		name_offset);
-	}
-      else
-	printf ("%s\n", constant_pool + name_offset);
-    }
-
    return 1;
  }

If that code is restored, does v9 functionality then return ?


> However, I also could not find
> this patch on the mailing list.   

It was posted to the PR, and I thought that I had seen it on the
mailing list too.  But obviously I was wrong.  Sorry about that.

Cheers
   Nick




More information about the Binutils mailing list