public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "jreiser at BitWagon dot com" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug symtab/25678] gdb crashes with "internal-error: sect_index_text not initialized" when .text missing and >2 segments Date: Tue, 11 Apr 2023 21:58:04 +0000 [thread overview] Message-ID: <bug-25678-4717-rxDo1QudPT@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-25678-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=25678 John Reiser <jreiser at BitWagon dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jreiser at BitWagon dot com --- Comment #12 from John Reiser <jreiser at BitWagon dot com> --- I see this when I dlopen() a shared library that has (Elf64_Ehdr.e_shnum == 0) : ===== GNU gdb (Debian 10.1-1.7) 10.1.90.20210103-git /build/gdb-MVZsgD/gdb-10.1/gdb/symfile.c:878: internal-error: sect_index_text not initialized A problem internal to GDB has been detected, further debugging may prove unreliable. Create a core file of GDB? (y or n) ===== Relying on the current libbfd, which looks only at ElfXX_Shdr (and not at ElfXX_Phdr{PT_DYNAMIC}), is not adequate when debugging execution. Neither the operating system {Linux kernel), nor the run-time dynamic linker (rtld or ld-linux.so} pays any attention to ElfXX_Shdr. Instead, execution is controlled entirely by the ElfXX_Phdr. In particular, the PT_DYNAMIC segment with its entries for PT_SYMTAB, PT_STRTAB, PT_GNU_HASH, PT_VERSYM, PT_VERNEED contain the same information that the SHT_DYNSYM, SHT_STRTAB, SHT_GNU_HASH, SHT_VERSYM, SHT_VERNEED sections may have once contained. So if ElfXX_Shdr cannot be found or do not look right, then libbfd and/or gdb should consult the ELFXX_Phdr{PT_DYNAMIC}. -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2023-04-11 21:58 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-03-15 2:24 [Bug symtab/25678] New: " klkblake at gmail dot com 2020-04-02 10:12 ` [Bug symtab/25678] " thravran.qathy at gmail dot com 2020-04-02 10:17 ` thravran.qathy at gmail dot com 2020-04-02 15:51 ` keiths at redhat dot com 2020-04-10 16:14 ` thravran.qathy at gmail dot com 2020-05-14 20:05 ` mlimber at gmail dot com 2020-05-16 19:22 ` simark at simark dot ca 2020-05-27 7:58 ` slyfox at inbox dot ru 2020-05-27 8:03 ` slyfox at inbox dot ru 2020-09-19 18:49 ` cebtenzzre at gmail dot com 2020-09-19 19:40 ` cebtenzzre at gmail dot com 2020-09-20 1:31 ` simark at simark dot ca 2020-10-08 9:15 ` napth at protonmail dot com 2023-04-11 21:58 ` jreiser at BitWagon dot com [this message] 2023-08-25 16:48 ` dilfridge at gentoo dot org 2024-01-14 4:45 ` sam at gentoo dot org 2024-01-14 4:45 ` sam at gentoo dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-25678-4717-rxDo1QudPT@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).