http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49364

           Summary: [4.7 regressions] Empty .debug_abbrev sections confuse
                    SGI nm
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: r...@gcc.gnu.org
                CC: ja...@gcc.gnu.org
              Host: mips-sgi-irix6.5
            Target: mips-sgi-irix6.5
             Build: mips-sgi-irix6.5


I just looked at a couple of recent gnat.dg/lto*.adb testsuite failures that
started to occur between 20110322 and 20110401.  They fail like this:

collect2: error: /var/gcc/gcc-4.7.0-20110601/6.5-gcc/gcc/nm returned 1 exit
status
gnatlink: error when calling /var/gcc/gcc-4.7.0-20110601/6.5-gcc/gcc/xgcc
gnatmake: *** link failed.

I can see the nm failure if invoking nm manually:

> nm -Bng 
> /var/gcc/gcc-4.7.0-20110601/6.5-gcc/mips-sgi-irix6.5/./libada/adainclude/ada.o
>  > /dev/null
/var/gcc/gcc-4.7.0-20110601/6.5-gcc/mips-sgi-irix6.5/./libada/adainclude/ada.o
ERROR:  dwarf_elf_init:  DW_DLE_DEBUG_ABBREV_NULL 34 .debug_abbrev section
present but elf_getdata() failed or section is zero-length

And indeed the .debug_abbrev section is 0-length, as seen with elfdump -h:

          **** SECTION  HEADER  TABLE ****
[No]   Type                  Addr       Offset     Size        Name
       Link       Info       Adralgn    Entsize    Flags

[...]
[5]    SHT_MIPS_DWARF        0          0x68       0           .debug_abbrev
       0          0          0x1        0          0x00000000 

This is a regression from 4.6 where this worked correctly.  I'm attaching both
the 4.6 and 4.7 assembler files.

  Rainer

Reply via email to