You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/11/27 11:19:53 UTC

[incubator-nuttx] 46/48: binfmt/libelf/libelf_dtors.c: Fix a syslog format

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 85f38b01c1eb2113e434c3785066dab00a491eeb
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Fri Nov 27 17:53:52 2020 +0900

    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 f7004d1..7e9c7c5 100644
--- a/binfmt/libelf/libelf_dtors.c
+++ b/binfmt/libelf/libelf_dtors.c
@@ -39,6 +39,8 @@
 
 #include <nuttx/config.h>
 
+#include <inttypes.h>
+#include <stdint.h>
 #include <string.h>
 #include <errno.h>
 #include <assert.h>
@@ -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;
             }