I'm moving a project from LD to LLD. An error has cropped up which appears due to the lack of global expression support in LLD. Are variables supported like this?
An simplified example of something that works in LD:
example.ld
_Flash_Origin = 0x01000000;
_App_Length = 16K;
_App_Origin = _Flash_Origin;
MEMORY
{
APP(rx) : ORIGIN = _App_Origin, LENGTH = _App_Length
}
The error is symbol not found: _App_Length
. I'm looking for the reason this occurs only in LLD.
The args provided are as follows:
--gc-sections (list of object files...) -Bstatic -L(big path...)clang/10.0.1/lib/baremetal -T example.ld -T sections.ld -o output.elf