On 3/13/24 11:43, Ilias Apalodimas wrote:
Hi Richard,
On Wed, 13 Mar 2024 at 22:19, Richard Henderson
<richard.hender...@linaro.org> wrote:
On 3/13/24 06:23, Ilias Apalodimas wrote:
+++ b/arch/arm/cpu/armv8/u-boot-spl.lds
@@ -63,18 +63,11 @@ SECTIONS
_image_binary_end = .;
- .bss_start (NOLOAD) : {
- . = ALIGN(8);
- KEEP(*(.__bss_start));
- } >.sdram
-
- .bss (NOLOAD) : {
+ .bss : {
+ __bss_start = .;
*(.bss*)
- . = ALIGN(8);
- } >.sdram
-
- .bss_end (NOLOAD) : {
- KEEP(*(.__bss_end));
+ . = ALIGN(8);
+ __bss_end = .;
Still missing the alignment on .bss, previously in .bss_start.
Since this is emitted in .sdram memory I can't define it as
.bss ALIGN(8) : {....} since the calculated memory will be outside the
sdram-defined region
I could define it as
.bss : {
. = ALIGN(8);
__bss_start = .;
......
}
But instead, I added an assert at the bottom which will break the
linking if the __bss_start is not 8byte aligned.
I think it would be clearer to assert on __bss_start address rather than
CONFIG_SPL_BSS_START_ADDR, if that's possible. If not, then the constant will have to do.
r~