[PATCH] sandbox: use barebox' own sbrk

Ahmad Fatoum a.fatoum at pengutronix.de
Mon Dec 2 00:16:36 PST 2024


dlmalloc uses sbrk, but so far this directly called into the libc
instead of using the barebox-internal symbol.

Fix this by adding a define for sbrk as well as brk for completion's
sake, even if we don't yet define the latter.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 arch/sandbox/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/sandbox/Makefile b/arch/sandbox/Makefile
index 9f110d5a6a0d..157e856c59b1 100644
--- a/arch/sandbox/Makefile
+++ b/arch/sandbox/Makefile
@@ -33,6 +33,7 @@ KBUILD_CFLAGS += -Dmalloc=barebox_malloc -Dcalloc=barebox_calloc \
 		-Dmalloc_stats=barebox_malloc_stats -Dmemalign=barebox_memalign \
 		-Dmalloc_usable_size=barebox_malloc_usable_size \
 		-Dfree=barebox_free -Drealloc=barebox_realloc \
+		-Dbrk=barebox_brk -Dsbrk=barebox_sbrk \
 		-Dread=barebox_read -Dwrite=barebox_write \
 		-Dopen=barebox_open -Dclose=barebox_close \
 		-Dlseek=barebox_lseek -Dperror=barebox_perror \
-- 
2.39.5




More information about the barebox mailing list