Skip to content
This repository has been archived by the owner on Jan 24, 2022. It is now read-only.

Commit

Permalink
Update linker script to fix arm-none-eabi-gcc linking. Closes #259
Browse files Browse the repository at this point in the history
  • Loading branch information
adamgreig committed Apr 3, 2020
1 parent aa11600 commit 8056cb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion link.x.in
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ SECTIONS
} > FLASH

/* ### .rodata */
.rodata __etext : ALIGN(4)
.rodata : ALIGN(4)
{
*(.rodata .rodata.*);

Expand Down

3 comments on commit 8056cb5

@jeru
Copy link

@jeru jeru commented on 8056cb5 May 24, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Adam,

It is really nice to see that a problem that one encounters is already fixed! Would this commit be released soon? Seems the master branch still has the problematic "__etext" there.

No urgent because I can just clone the git repository myself and point cargo to it. It would still be nice to know when it would be released so I can clean up the mess on my side though.

Regards,
Cheng

@adamgreig
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! In the end it turned out we don't really need to remove __etext (#260) but instead you need to add -nostartfile when invoking gcc as a linker, as is done in the .cargo/config in this repository for example. So, this commit did not get merged.

That said it's worth saying you can also override link.x.in yourself entirely without needing to clone cortex-m-rt or updating Cargo: just place your modified copy of link.x.in named link.x in your project directory. But you don't need to do that to fix this issue, just add -nostartfiles.

@jeru
Copy link

@jeru jeru commented on 8056cb5 May 25, 2020 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.