Attention is currently required from: Julius Werner, Jan Dabros.
2 comments:
File tests/lib/bootmem-test.c:
Patch Set #5, Line 29: to avoid problems with compile-time expressions containing symbols. */
What problems did you have with this? Ideally we can solve them rather than needing to duplicate so […]
I had problems with `#define STACK_END_TO_RESERVED_START_SIZE (RESERVED_START - STACK_END)` and similar cases. This macro contains expresion with linker symbol value and constant value (#define or const int, does not matter). If you try to do this you will get an error telling that it cannot be put in global structure, because value is not computable at load-time.
I was thinking about defining separate symbols with this value but there are problems with symbol size. Default size is 32-bit and I do not want to use compiler flags like `-mcmodel=large` you suggested, because it would give an impression that it is required to make lib/bootmem work correctly.
Patch Set #5, Line 36: TEST_SYMBOL(_eprogram, _program + _program_size);
Looking at this again I really think we should introduce another wrapper macro for this use case, e. […]
Yes, macro like that would make tests code more readable. I will introduce it in separate change. :)
To view, visit change 43510. To unsubscribe, or for help writing mail filters, visit settings.