From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joel Sherrill To: Nick Clifton Cc: binutils@sourceware.cygnus.com Subject: Re: arm-elf message Date: Tue, 01 Aug 2000 09:00:00 -0000 Message-id: <3986EC73.BE1C96A7@OARcorp.com> References: <200007311903.MAA21477@elmo.cygnus.com> X-SW-Source: 2000-08/msg00008.html Nick Clifton wrote: > > Hi Joel, > > : I am using arm-rtems which is arm-elf aliased to arm-rtems for > : both binutils and gdb. When I try to load the resulting > : executable in the simulator in gdb, I get an error message > : I assume is from the BFD. > > Actually it is from gdb, specifically from > dwarf2_build_psymtabs_hard() in gdb/dwarf2read.c. > > : Dwarf Error: bad offset (0xb91c0) in compilation unit header (offset > : 0x0 + 6). > : > : What does this message mean > > I assume that you know what a compilation unit is. > > It means that in the header describing the dwarf2 debug information > for a particular compilation unit, the offset into the .debug.abbrev > section is actually bigger than that section's size, (and hence must > be wrong/corrupt). Weird.. I was using a handcrafted linker script and it did not have this section in it. That must have confused gdb. Fixed now. Thanks. > : and more importantly what is broken? > > Well it sounds like the compilation unit header is corrupt. These > headers are usually the first data that occurs in the debugging > sections, so it is possible that the headers have been overwritten by > data from whichever section comes before the debug section ... > > : I have forced some extra data in my .bss section and it turns out > : that 0xb91c0 is the _end of the entire program image. > > And by "forced" you mean what ? > > This forcing, whatever it is, is probably the source of your > problems. I would begin my investigation there. > > Cheers > Nick -- Joel Sherrill, Ph.D. Director of Research & Development joel@OARcorp.com On-Line Applications Research Ask me about RTEMS: a free RTOS Huntsville AL 35805 Support Available (256) 722-9985