This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug symtab/16582] New: Internal error with elf file that has no ".text" section


https://sourceware.org/bugzilla/show_bug.cgi?id=16582

            Bug ID: 16582
           Summary: Internal error with elf file that has no ".text"
                    section
           Product: gdb
           Version: 7.6
            Status: NEW
          Severity: normal
          Priority: P2
         Component: symtab
          Assignee: unassigned at sourceware dot org
          Reporter: ehunter at broadcom dot com

Our build system generates elf files with no ".text" section. (we have
".text1", ".text2", ".text3")
This is a perfectly legitimate thing to do, but GDB is crashing because of
this.

Why should it be a requirement that the ".text" section exists?

Command:
    add-sym bad_bootloader.elf 0x8000000

Error:
    ../../gdb-7.6.1/gdb/dwarf2read.c:4937: internal-error: sect_index_text not
initialized
A problem internal to GDB has been detected,
further debugging may prove unreliable.


Our GDB-7.6.1 was compiled on MinGW with the following configuration:
    configure --target=arm-none-eabi --disable-nls 
CFLAGS="-D__USE_MINGW_ACCESS -static  -static-libgcc"


Below is a dump of the elf file sections:

bad_bootloader.elf:     file format elf32-littlearm

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text1        00000184  08000000  08000000  00008000  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  1 .text2        00000030  08000200  08000200  00008200  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  2 .text3        00001ff0  08000400  08000400  00008400  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  3 .startup_globals 00000004  20000000  20000000  00010000  2**2
                  ALLOC
  4 .bss.uart_drivers 00000030  20000004  20000004  00010000  2**2
                  ALLOC
  5 .bss.gpio_irq_data 000000c0  20000034  20000034  00010000  2**2
                  ALLOC
  6 .stack        00000fa0  200000f4  200000f4  00010000  2**0
                  ALLOC
  7 .debug_info   0001337c  00000000  00000000  0000a3f0  2**0
                  CONTENTS, READONLY, DEBUGGING
  8 .debug_abbrev 00002e56  00000000  00000000  0001d76c  2**0
                  CONTENTS, READONLY, DEBUGGING
  9 .debug_loc    000076da  00000000  00000000  000205c2  2**0
                  CONTENTS, READONLY, DEBUGGING
 10 .debug_aranges 00000b90  00000000  00000000  00027c9c  2**0
                  CONTENTS, READONLY, DEBUGGING
 11 .debug_ranges 00001a80  00000000  00000000  0002882c  2**0
                  CONTENTS, READONLY, DEBUGGING
 12 .debug_line   00005a7b  00000000  00000000  0002a2ac  2**0
                  CONTENTS, READONLY, DEBUGGING
 13 .debug_str    000087d9  00000000  00000000  0002fd27  2**0
                  CONTENTS, READONLY, DEBUGGING
 14 .debug_frame  00001884  00000000  00000000  00038500  2**2
                  CONTENTS, READONLY, DEBUGGING

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]