[PATCH] binman: Document the __bss_size symbol error

Simon Glass sjg at chromium.org
Sun Jan 23 20:55:46 CET 2022


Add a note about the message so it is clear why it occurs.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 tools/binman/binman.rst | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/tools/binman/binman.rst b/tools/binman/binman.rst
index db2234bd8ff..eb2c9d4bdcc 100644
--- a/tools/binman/binman.rst
+++ b/tools/binman/binman.rst
@@ -1232,6 +1232,35 @@ To enable Python test coverage on Debian-type distributions (e.g. Ubuntu)::
    $ sudo apt-get install python-coverage python3-coverage python-pytest
 
 
+Error messages
+--------------
+
+This section provides some guidance for some of the less obvious error messages
+produced by binman.
+
+
+Expected __bss_size symbol
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Example::
+
+   binman: Node '/binman/u-boot-spl-ddr/u-boot-spl/u-boot-spl-bss-pad':
+      Expected __bss_size symbol in spl/u-boot-spl
+
+This indicates that binman needs the `__bss_size` symbol to be defined in the
+SPL binary, where `spl/u-boot-spl` is the ELF file containing the symbols. The
+symbol tells binman the size of the BSS region, in bytes. It needs this to be
+able to pad the image so that the following entries do not overlap the BSS,
+which would cause them to be overwritte by variable access in SPL.
+
+This symbols is normally defined in the linker script, immediately after
+_bss_start and __bss_end are defined, like this::
+
+    __bss_size = __bss_end - __bss_start;
+
+You may need to add it to your linker script if you get this error.
+
+
 Concurrent tests
 ----------------
 
-- 
2.35.0.rc0.227.g00780c9af4-goog



More information about the U-Boot mailing list