-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
post/2020-04-11-mastering-the-gnu-linker-script/ #3
Comments
In the last section, why bother with the
|
Both approaches would work well. My preference is to keep the linker script with as few symbol definitions as possible, restricted to what is strictly necessary for your bootstrapping the target application. Using a section and declaring the variable in that section has the advantage that the symbol does not require C linkage and could be name-spaced or could have internal linkage, providing better encapsulation. |
Thanks for the wonderful tutorial. One question: why the code in the last example is |
Great question @xinyew. I didn't touch upon why I lean towards using |
nit: |
Fixed, thanks for reporting it. |
Mastering the GNU linker script - AllThingsEmbedded
Most people getting started with embedded development seem to find linker scripts just another piece of magic required to get up and running with their system. Even when they might already be familiar with memory-mapped peripherals and basic embedded concepts, the linker script and how it interacts with the GNU linker (ld) is still pretty mysterious.
Today we will go through the main functions of a linker script to try to shed some light onto their operation.
https://allthingsembedded.com/post/2020-04-11-mastering-the-gnu-linker-script/
The text was updated successfully, but these errors were encountered: