Open dev-72-Z opened 3 weeks ago
Hi @dev-72-Z! We appreciate you submitting your first issue for our open-source project. 🌟
Even though I'm a bot, I can assure you that the whole community is genuinely grateful for your time and effort. 🤖💙
I need to build Zephyr as position independent code.
Please describe the use case a bit more.
We have memory addresses "hardcoded" in .dts
files.
Based on .dts
file ~/include/generated/devicetree_generated.h is generated early in build process.
The result binary, has .rodata
section whose content depends on the absolute addresses from .dts
file.
Assuming we have several platforms for the same SOC, but with different .dts
files. After any change in code
we have to build binary for each one of them.
If we had position independent code, i.e. no absolute addresses in .rodata, one binary could be used
for all platforms.
Is your feature request related to a problem? Please describe. I need to build Zephyr as position independent code.
Describe the solution you'd like To have PIC option in linker scripts, or to be able to set it with not to much intervention in the code.
Describe alternatives you've considered Tried to have .rodata section not dependent on absolute addresses set in .dts files. Didn't manage to move the initlevel section.
Additional context