How to Resolve Linker Script Variables in Rust code?

In C code one can reference a variable that is defined externally in a linker script and it is happily resolved by the linker at that stage of the build. For example, in some C boot code the linker script is used to calculate the size of a flash memory section (_flashsize) based on the subsections defined in the script, which is typical of linker scripts. The C boot code defines "extern _flashsize" and uses it as necessary and the build suceeds

In Rust however there appears to be no way to tell the compiler to let the resolution be handled by the linker and the build quits in the compiler.

Is there a way of allowing this behavior a Rust version of the boot code?

Thanks for any suggestions.

Bob Stewart

Thanks. That helps me.

Bob