From 2c4e689bc1ed4440d0d95b3b350ce872e7f75865 Mon Sep 17 00:00:00 2001 From: James Clarke Date: Mon, 3 Feb 2020 00:53:17 +0000 Subject: Support manually zeroing out BSS when booting (#188) Some ELF loaders, in particular gdb's load command for dynamically loading files into memory, which is often used to load binaries onto FPGAs over JTAG, do not zero out BSS, leaving the memory in whatever state it was previously in. Thus, introduce a new --enable-zero-bss configure flag, which will include code to zero out BSS when booting. --- configure | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'configure') diff --git a/configure b/configure index 587f1f6..9d2c146 100755 --- a/configure +++ b/configure @@ -675,6 +675,7 @@ with_arch with_abi enable_print_device_tree with_mem_start +enable_zero_bss enable_optional_subprojects enable_vm enable_logo @@ -1314,6 +1315,7 @@ Optional Features: --enable-stow Enable stow-based install --enable-print-device-tree Print DTS when booting + --enable-zero-bss Manually zero out BSS when booting --enable-optional-subprojects Enable all optional subprojects --disable-vm Disable virtual memory @@ -4122,6 +4124,19 @@ else fi +# Check whether --enable-zero-bss was given. +if test "${enable_zero_bss+set}" = set; then : + enableval=$enable_zero_bss; +fi + +if test "x$enable_zero_bss" = "xyes"; then : + + +$as_echo "#define ZERO_BSS /**/" >>confdefs.h + + +fi + #------------------------------------------------------------------------- # MCPPBS subproject list #------------------------------------------------------------------------- -- cgit v1.1