You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a linker script that contains a variable, and the newest version v0.1.10 fails to parse the linker script because the evaluation logic added in #104 does not take variables into account.
error: linking with `flip-link` failed: exit status: 101
|
[...]
= note: thread 'main' panicked at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/flip-link-0.1.10/src/main.rs:353:13:
Failed to parse expression "0x20000000 + _stack_guard_size" ("0x20000000 + _stack_guard_size"), got error VariableIdentifierNotFound("_stack_guard_size")
stack backtrace:
0: rust_begin_unwind
1: core::panicking::panic_fmt
2: flip_link::evaluate_expression
3: flip_link::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
I used that same linker script with old versions of flip-link and they never complained, but I guess variables were never supported so my RAM sizes must have always been wrong?
I'm not sure manually parsing the entire linker script is a good idea, but it would be possible to use a crate to do the parsing. I've found ldscript-parser which has not received any activity within a year but seems to be very well tested.
I would be willing to provide a PR trying to replace evalexpr with ldscript-parser if you are on board with this approach.
Just checked and ldscript-parser only supports raw values in the origin and length fields, so we can't use it.
The text was updated successfully, but these errors were encountered:
I have a linker script that contains a variable, and the newest version
v0.1.10
fails to parse the linker script because the evaluation logic added in #104 does not take variables into account.Example linker script with a variable
flip-link linker error
I used that same linker script with old versions of flip-link and they never complained, but I guess variables were never supported so my RAM sizes must have always been wrong?
I'm not sure manually parsing the entire linker script is a good idea, but it would be possible to use a crate to do the parsing.
I've foundldscript-parser which has not received any activity within a year but seems to be very well tested.
I would be willing to provide a PR trying to replaceevalexpr
withldscript-parser
if you are on board with this approach.Just checked and
ldscript-parser
only supports raw values in the origin and length fields, so we can't use it.The text was updated successfully, but these errors were encountered: