~jpsamaroo/pahole

9e495f68c683574f6b42f9ee19dc156da284aba3 — Arnaldo Carvalho de Melo 1 year, 5 months ago 69fce76
dwarf_loader: Move vaddr to conditional where it is used

To avoid build failures in architectures where HAVE_DWFL_MODULE_BUILD_ID
isn't defined.

Noticed while cross building for s390x.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 files changed, 1 insertions(+), 1 deletions(-)

M dwarf_loader.c
M dwarf_loader.c => dwarf_loader.c +1 -1
@@ 2309,11 2309,11 @@ static int cus__load_module(struct cus *cus, struct conf_load *conf,
{
	Dwarf_Off off = 0, noff;
	size_t cuhl;
	GElf_Addr vaddr;
	const unsigned char *build_id = NULL;
	uint8_t pointer_size, offset_size;

#ifdef HAVE_DWFL_MODULE_BUILD_ID
	GElf_Addr vaddr;
	int build_id_len = dwfl_module_build_id(mod, &build_id, &vaddr);
#else
	int build_id_len = 0;