diff options
author | Ian Lance Taylor <iant@golang.org> | 2024-02-29 19:44:19 -0800 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2024-02-29 19:45:57 -0800 |
commit | c6d4fb0062c6059fe21968a9fe44c56814c88873 (patch) | |
tree | 7cc8b2014565497d0eb47f4756d52786ed1fa268 /libbacktrace/elf.c | |
parent | b05f474c8f7768dad50a99a2d676660ee4db09c6 (diff) | |
download | gcc-c6d4fb0062c6059fe21968a9fe44c56814c88873.zip gcc-c6d4fb0062c6059fe21968a9fe44c56814c88873.tar.gz gcc-c6d4fb0062c6059fe21968a9fe44c56814c88873.tar.bz2 |
libbacktrace: read symbol table of debuginfo file
These become another symbol table to search. This is needed if people
use --strip-all rather than --strip-debug when adding a debuglink
section.
Patch is from GitHub user pickard1.
Fixes https://github.com/ianlancetaylor/libbacktrace/issues/113.
* elf.c (elf_add): Add the symbol table from a debuginfo file.
* Makefile.am (MAKETESTS): Add buildidfull and gnudebuglinkfull
variants of buildid and gnudebuglink tests.
(%_gnudebuglinkfull, %_buildidfull): New patterns.
* Makefile.in: Regenerate.
Diffstat (limited to 'libbacktrace/elf.c')
-rw-r--r-- | libbacktrace/elf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libbacktrace/elf.c b/libbacktrace/elf.c index c506cc2..664937e 100644 --- a/libbacktrace/elf.c +++ b/libbacktrace/elf.c @@ -6872,7 +6872,7 @@ elf_add (struct backtrace_state *state, const char *filename, int descriptor, if (symtab_shndx == 0) symtab_shndx = dynsym_shndx; - if (symtab_shndx != 0 && !debuginfo) + if (symtab_shndx != 0) { const b_elf_shdr *symtab_shdr; unsigned int strtab_shndx; |