Closed japaric closed 2 years ago
I don't know if this is documented in LD/LLD docs but from what I've seen linker scripts are searched for in the "linker search path". The first (highest precedence) entry in the linker search path is the current directory; other entries are specified via the -L
flag.
When looking for the MEMORY entry in linker scripts, flip-link
should follow the above (MEMORY.x
in current directory should take precedence over the one in the target
directory)
update: fixed in #63 but not in latest crates.io release (v0.1.5)
flip-link v0.1.6 has been released and includes this fix
Steps to reproduce
Instantiate the
app-template
for the nRF52840 (addnrf52840-hal
as a dependency).Create a
memory.x
overrideBoth binary tools indicate that
flip-link
thinks the RAM size is 256 KiB (0x4_0000
) even though thememory.x
override indicates 128 KiBrust-lld
(disableflip-link
)rust-lld
respects thememory.x
override and uses 128 KiB as the size of theRAM
regionMeta
flip-link
version