We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I am building some applications that use a static library and I would want to force linker to put .text and .data sections of the static library (.a file) at specific addresses using GNU linker (arm-none-eabi-gcc) but I couldn't find a way how the linker script can be modified to force/put the libx.a at a specific address considering that this library has .text and .data sections.
Is there any way to do it?
I tried the below but linker does nothing:
.text_libx : { . = ALIGN(4); KEEP(libx.a(.text .text.*)) } >FLASH_libx
where FLASH_libx is defined to a desired address.
Actually what I want to do is to force linker to put all .text and .data from a library (indeed all of its objects) at a specific address range that later when a use links its own application, the lib-related codes stay at that address range that if any FW update or FOTA is executed, then the library code is not needed to be updated.