From 5d040ec6cc8da95e206f043bb5924aa7103cd185 Mon Sep 17 00:00:00 2001 From: Matthias Maennich Date: Fri, 4 Oct 2019 16:27:07 +0100 Subject: [PATCH] dwarf-reader: read_corpus_from_elf: unconditionally load elf properties When loading the corpus from elf while specifying a whitelist, we might be able to ignore the symbol table. In any case we have to load the elf properties into the context, such as the binary's architecture. Otherwise they are missing from the internal / xml representation. Previously, elf properties were not loaded when a whitelist was specified. Fix that. * src/abg-dwarf-reader.cc (read_corpus_from_elf): unconditionally load elf properties into context Signed-off-by: Matthias Maennich --- src/abg-dwarf-reader.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/abg-dwarf-reader.cc b/src/abg-dwarf-reader.cc index af212acf..f2ebede1 100644 --- a/src/abg-dwarf-reader.cc +++ b/src/abg-dwarf-reader.cc @@ -18255,9 +18255,10 @@ read_corpus_from_elf(read_context& ctxt, status& status) status |= STATUS_ALT_DEBUG_INFO_NOT_FOUND; } + ctxt.load_elf_properties(); // DT_SONAME, DT_NEEDED, architecture + if (!get_ignore_symbol_table(ctxt)) { - ctxt.load_elf_properties(); // Read the symbols for publicly defined decls if (!ctxt.load_symbol_maps()) status |= STATUS_NO_SYMBOLS_FOUND; -- 2.34.1