diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2022-09-05 11:55:28 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-09-12 12:01:49 +0200 |
commit | 8c7b01e3f5ffdc0a596c921e7bf195d7553b888e (patch) | |
tree | 5e7e0121b6f61731faf573fd4296a5e4d20ed6ef | |
parent | ecf5fe6c76584ee69536857d127f9a1a086d88d6 (diff) | |
download | barebox-8c7b01e3f5ffdc0a596c921e7bf195d7553b888e.tar.gz barebox-8c7b01e3f5ffdc0a596c921e7bf195d7553b888e.tar.xz |
meminfo: support SANDBOX build with DEBUG log level
We don't necessarily have _[se]text, __bss_(start|stop) symbols on
sandbox, so we shouldn't reference these there in the debug prints.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20220905095557.596891-4-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | common/meminfo.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/common/meminfo.c b/common/meminfo.c index e6b251e5bf..f4994959b6 100644 --- a/common/meminfo.c +++ b/common/meminfo.c @@ -12,8 +12,10 @@ static int display_meminfo(void) ulong mend = mem_malloc_end(); ulong msize = mend - mstart + 1; - pr_debug("barebox code: 0x%p -> 0x%p\n", _stext, _etext - 1); - pr_debug("bss segment: 0x%p -> 0x%p\n", __bss_start, __bss_stop - 1); + if (!IS_ENABLED(CONFIG_SANDBOX)) { + pr_debug("barebox code: 0x%p -> 0x%p\n", _stext, _etext - 1); + pr_debug("bss segment: 0x%p -> 0x%p\n", __bss_start, __bss_stop - 1); + } pr_info("malloc space: 0x%08lx -> 0x%08lx (size %s)\n", mstart, mend, size_human_readable(msize)); return 0; |