-
Notifications
You must be signed in to change notification settings - Fork 84
_stext fails to move .text with lld #188
Comments
#164 seems to be related as all of this is in attempt to support the flash configuration section on an NXP device. |
Your |
It is my understanding that when a load address is not given the virtual address is used as the loading address. Still, to test your suggestion I changed the
With this I still see the previous suite of errors. Please correct me if I went about implementing your suggestion wrong. |
Yeah, seems OK. I'm not sure though if it's the correct way of implementing this in case of lld. In |
Because I had a copy of the This all seems like a bug in EDIT: Can I just say, man, was I hoping this wasn't a bug in TL;DR: This seems to be caused by a bug in |
Thanks for fixing the issue! |
A little update on this. While my patch got merged into LLVM master, I found an issue with it shortly after. While raw binaries are created correctly, ELF binaries have the possibility of the ELF headers getting written over by a section defined in a linker script. In short, this has not been fully resolved yet. |
…jects Tested with 1.34.0 and 1.38.0 and careful inspection of the linker map generated on the previously failing https://github.com/rust-lang/rust/files/3722440/minimal-rust-lld-issue.zip Closes rust-embedded#188 (I believe) Closes rust-lang/rust#65391 Signed-off-by: Daniel Egger <daniel@eggers-club.de>
207: Rejig link.x to include more lables to help the linker lay out the ob… r=thejpster a=therealprof …jects Tested with 1.34.0 and 1.38.0 and careful inspection of the linker map generated on the previously failing https://github.com/rust-lang/rust/files/3722440/minimal-rust-lld-issue.zip Closes #188 (I believe) Closes rust-lang/rust#65391 Signed-off-by: Daniel Egger <daniel@eggers-club.de> Co-authored-by: Daniel Egger <daniel@eggers-club.de>
I have an older program/library that I am moving to lld so that I can work with ease on more than just Linux. The code in question is https://github.com/yodaldevoid/mkl26/tree/lld_port. Please note that the example/library currently require nightly and should be built for thumbv6m-none-eabi.
To start, the code compiles and runs correctly using gcc's linker.
When attempting to compile the
blink
example with lld usingcargo build --example blink
I get the following error:If I change line 20 in
memory.x
to_stext = 0x410;
I then get the following error:It appears that
.flashconfig
is not being placed at 0x400 despite what the linker script says. Am I doing something wrong here or is this some sort of bug?The text was updated successfully, but these errors were encountered: