From 814020d9d087aa892db8bc158e26c73e1d27db7b Mon Sep 17 00:00:00 2001 From: Jonathon Reinhart Date: Sun, 27 Sep 2020 19:48:43 -0400 Subject: [PATCH] bootloader: Fix debug print for 32/64 bit ELF --- bootloader/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bootloader/main.c b/bootloader/main.c index c47f7ea..2d1251c 100644 --- a/bootloader/main.c +++ b/bootloader/main.c @@ -2,6 +2,8 @@ #include #include #include +#include +#include #include #include #include @@ -160,7 +162,8 @@ set_rpath(Elf_Ehdr *ehdr, const char *new_rpath) error(2, 0, "RPATH outside of dynamic strtab!"); char *rpath = ptr_add(dynstrtab, dt_rpath->d_un.d_val); - debug_printf("Current RPATH (0x%lX): \"%s\"\n", dt_rpath->d_un.d_val, + debug_printf("Current RPATH (0x%"PRIXPTR"): \"%s\"\n", + (uintptr_t)dt_rpath->d_un.d_val, fmt_str_rep(rpath)); /* Set new RPATH */