mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 05:06:09 +08:00
libs/libc/modlib/modlib_symbols.c: Fix syslog formats
This commit is contained in:
committed by
Xiang Xiao
parent
6bdca69a32
commit
34cd44f8d7
@@ -24,6 +24,8 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include <stdint.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@@ -366,7 +368,7 @@ int modlib_symvalue(FAR struct module_s *modp,
|
|||||||
(FAR void *)&exportinfo);
|
(FAR void *)&exportinfo);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
berr("ERROR: modlib_symcallback failed: \n", ret);
|
berr("ERROR: modlib_symcallback failed: %d\n", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -401,9 +403,11 @@ int modlib_symvalue(FAR struct module_s *modp,
|
|||||||
* entry
|
* entry
|
||||||
*/
|
*/
|
||||||
|
|
||||||
binfo("SHN_UNDEF: name=%s %08x+%08x=%08x\n",
|
binfo("SHN_UNDEF: name=%s "
|
||||||
loadinfo->iobuffer, sym->st_value, symbol->sym_value,
|
"%08" PRIxPTR "+%08" PRIxPTR "=%08" PRIxPTR "\n",
|
||||||
sym->st_value + symbol->sym_value);
|
loadinfo->iobuffer,
|
||||||
|
(uintptr_t)sym->st_value, (uintptr_t)symbol->sym_value,
|
||||||
|
(uintptr_t)(sym->st_value + symbol->sym_value));
|
||||||
|
|
||||||
sym->st_value += ((uintptr_t)symbol->sym_value);
|
sym->st_value += ((uintptr_t)symbol->sym_value);
|
||||||
}
|
}
|
||||||
@@ -413,8 +417,9 @@ int modlib_symvalue(FAR struct module_s *modp,
|
|||||||
{
|
{
|
||||||
secbase = loadinfo->shdr[sym->st_shndx].sh_addr;
|
secbase = loadinfo->shdr[sym->st_shndx].sh_addr;
|
||||||
|
|
||||||
binfo("Other: %08x+%08x=%08x\n",
|
binfo("Other: %08" PRIxPTR "+%08" PRIxPTR "=%08" PRIxPTR "\n",
|
||||||
sym->st_value, secbase, sym->st_value + secbase);
|
(uintptr_t)sym->st_value, secbase,
|
||||||
|
(uintptr_t)(sym->st_value + secbase));
|
||||||
|
|
||||||
sym->st_value += secbase;
|
sym->st_value += secbase;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user