Attention is currently required from: Jakub Czapiga, Jan Dabros. Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43510 )
Change subject: tests: Add lib/bootmem-test test case ......................................................................
Patch Set 5:
(1 comment)
File tests/lib/bootmem-test.c:
https://review.coreboot.org/c/coreboot/+/43510/comment/5abfa13d_b506cc0d PS5, Line 29: to avoid problems with compile-time expressions containing symbols. */
I had problems with `#define STACK_END_TO_RESERVED_START_SIZE (RESERVED_START - STACK_END)` and simi […]
So using `<constant> - <symbol>` in a static initializer also fails? I understand why `<symbol> - <symbol>` would fail (and that's how you had it at first... did you try it again after changing the RESERVED region to just use constants?), but I think the other one should be perfectly doable using a relocation with an offset. Maybe GCC isn't as smart as I was hoping it would be there...
If it's not possible I'd just make one special constant for the stack end to use in that case (with a comment why it's needed), but not for every other symbol you have.