Mark Wielaard <m...@redhat.com> writes:

> This PR was put on hold for a while since gdb didn't immediately need
> it. But the consensus seemed that it was a good idea to always output
> the address ranges (.debug_arange section) information if a CU
> (.debug_info section) was emitted. Because the consumer has no way to
> tell the difference between an empty table that we omitted and failure
> to generate a table that would have contained data. We recently
> discussed this again (see PR), and it still seems like a good thing. So
> here it a patch to just do that:

I doubt this is a good idea in general: I've seen the following failure
in the libgo testsuite on IRIX 6.5:

_gotest_.o ERROR:  dwarf_elf_init:  DW_DLE_DEBUG_ABBREV_NULL 34 .debug_abbrev 
section present but elf_getdata() failed or section is zero-length
gotest: warning: no tests matching Test([^a-z].*)? in _gotest_.o _xtest_.o

elfdump reveals:

[13]   SHT_MIPS_DWARF        0          0x410      0           .debug_abbrev
       0          0          0x1        0          0x00000000 

So at least some linkers and tools get confused by such emtpy sections.

        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Reply via email to