]> sourceware.org Git - libabigail.git/commitdiff
abg-ctf-reader: use the right string table for CTF data
authorJose E. Marchesi via Libabigail <libabigail@sourceware.org>
Wed, 10 Nov 2021 12:50:50 +0000 (13:50 +0100)
committerDodji Seketeli <dodji@redhat.com>
Wed, 10 Nov 2021 15:35:13 +0000 (16:35 +0100)
The CTF library needs the string table associated with the symbol
table of the ELF file.  This patch makes the CTF reader to use the
right string table.

Signed-off-by: Jose E. Marchesi <jose.marchesi@oracle.com>
* src/abg-ctf-reader.cc (slurp_elf_info): Use
find_strtab_for_symtab_section.

src/abg-ctf-reader.cc

index 51fb2ed90f5307419a4ebb7bd6382df7cb47a2be..27eddc2efdcb33d5f9976ec5fb7fc2f73fee87bc 100644 (file)
@@ -1040,7 +1040,8 @@ slurp_elf_info(read_context *ctxt, corpus_sptr corp)
   /* Get the raw ELF section contents for libctf.  */
   Elf_Scn *ctf_scn = elf_helpers::find_section(ctxt->elf_handler, ".ctf", SHT_PROGBITS);
   Elf_Scn *symtab_scn = elf_helpers::find_symbol_table_section(ctxt->elf_handler);
-  Elf_Scn *strtab_scn = elf_helpers::find_section(ctxt->elf_handler, SHT_STRTAB);
+  Elf_Scn *strtab_scn = elf_helpers::find_strtab_for_symtab_section(ctxt->elf_handler,
+                                                                    symtab_scn);
 
   if (ctf_scn == NULL || symtab_scn == NULL || strtab_scn == NULL)
     return 0;
This page took 0.034063 seconds and 5 git commands to generate.