From 85f38b01c1eb2113e434c3785066dab00a491eeb Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Fri, 27 Nov 2020 17:53:52 +0900 Subject: [PATCH] binfmt/libelf/libelf_dtors.c: Fix a syslog format --- binfmt/libelf/libelf_dtors.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/binfmt/libelf/libelf_dtors.c b/binfmt/libelf/libelf_dtors.c index f7004d1dfb..7e9c7c5a4e 100644 --- a/binfmt/libelf/libelf_dtors.c +++ b/binfmt/libelf/libelf_dtors.c @@ -39,6 +39,8 @@ #include +#include +#include #include #include #include @@ -192,9 +194,10 @@ int elf_loaddtors(FAR struct elf_loadinfo_s *loadinfo) FAR uintptr_t *ptr = (uintptr_t *) ((FAR void *)(&loadinfo->dtors)[i]); - binfo("dtor %d: %08lx + %08lx = %08lx\n", - i, *ptr, (unsigned long)loadinfo->textalloc, - (unsigned long)(*ptr + loadinfo->textalloc)); + binfo("dtor %d: " + "%08" PRIxPTR " + %08" PRIxPTR " = %08" PRIxPTR "\n", + i, *ptr, (uintptr_t)loadinfo->textalloc, + (uintptr_t)(*ptr + loadinfo->textalloc)); *ptr += loadinfo->textalloc; }