binutils/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Mon, 7 Sep 2009 18:07:02 +0000 (18:07 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Mon, 7 Sep 2009 18:07:02 +0000 (18:07 +0000)
* dwarf.c (process_debug_info): Support section padding abbrev codes.

binutils/testsuite/
* binutils-all/testranges.s (.debug_info): Pad the only CU.

binutils/ChangeLog
binutils/dwarf.c
binutils/testsuite/ChangeLog
binutils/testsuite/binutils-all/testranges.s

index 107cb8d29a793f2072005d68a7bb336f4f0a2136..e44742515c0b2cc37803c51fe430a35dabe75d56 100644 (file)
@@ -1,3 +1,7 @@
+2009-09-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * dwarf.c (process_debug_info): Support section padding abbrev codes.
+
 2009-09-07  Tristan Gingold  <gingold@adacore.com>
 
        * po/binutils.pot: Regenerate.
index 9c7c9a87aa02a30404b4ce9b6b2084bb44879c50..46b6929a0110c10a81a97b6aa0214e8ea8213190 100644 (file)
@@ -1985,9 +1985,22 @@ process_debug_info (struct dwarf_section *section,
          abbrev_number = read_leb128 (tags, & bytes_read, 0);
          tags += bytes_read;
 
-         /* A null DIE marks the end of a list of siblings.  */
+         /* A null DIE marks the end of a list of siblings or it may also be
+            a section padding.  */
          if (abbrev_number == 0)
            {
+             /* Check if it can be a section padding for the last CU.  */
+             if (level == 0 && start == end)
+               {
+                 unsigned char *chk;
+
+                 for (chk = tags; chk < start; chk++)
+                   if (*chk != 0)
+                     break;
+                 if (chk == start)
+                   break;
+               }
+
              --level;
              if (level < 0)
                {
index d212b6735256b27a5ee65c5a0655041fee88fbf6..250959e0be3a7a6bdbf1b3a0055e98e79572e51f 100644 (file)
@@ -1,3 +1,7 @@
+2009-09-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * binutils-all/testranges.s (.debug_info): Pad the only CU.
+
 2009-09-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        * binutils-all/testranges.s: Replace all .long by .4byte.
index 0964519387cf40ac59ae593728a6d1786ef9e9f8..e1f9931b999f9f2506ffe99b51bfba40b9ebe548 100644 (file)
@@ -32,6 +32,10 @@ debugS:
        .uleb128 0x2    ;# (DIE (0x6d) DW_TAG_subprogram)
        .ascii "A\0"    ;# DW_AT_name
        .4byte  range_sub - range       ;# DW_AT_ranges
+
+       ;# minimal section alignment on alpha-* is 2, ensure no new invalid CU
+       ;# will be started.
+       .balign 2
 debugE:
 
        .section        .debug_abbrev,"",%progbits
This page took 0.034431 seconds and 4 git commands to generate.