public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] dwarf-reader: read_corpus_from_elf: unconditionally load elf properties
@ 2019-01-01  0:00 Matthias Maennich via libabigail
  2019-01-01  0:00 ` Dodji Seketeli
  0 siblings, 1 reply; 2+ messages in thread
From: Matthias Maennich via libabigail @ 2019-01-01  0:00 UTC (permalink / raw)
  To: libabigail; +Cc: dodji, kernel-team, maennich

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 <maennich@google.com>
---
 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 af212acfa477..f2ebede11582 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.23.0.581.g78d2f28ef7-goog

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] dwarf-reader: read_corpus_from_elf: unconditionally load elf properties
  2019-01-01  0:00 [PATCH] dwarf-reader: read_corpus_from_elf: unconditionally load elf properties Matthias Maennich via libabigail
@ 2019-01-01  0:00 ` Dodji Seketeli
  0 siblings, 0 replies; 2+ messages in thread
From: Dodji Seketeli @ 2019-01-01  0:00 UTC (permalink / raw)
  To: Matthias Maennich; +Cc: libabigail, kernel-team

Hello,

Matthias Maennich <maennich@google.com> a écrit:

> 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

Committed to master, thanks!


-- 
		Dodji

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-07  9:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-01  0:00 [PATCH] dwarf-reader: read_corpus_from_elf: unconditionally load elf properties Matthias Maennich via libabigail
2019-01-01  0:00 ` Dodji Seketeli

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).