When to use "Position-Indipendent Code" option

1 post / 0 new
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0



I have an Atmel SAM4E16C with a bootloader at the start of the program memory and an application at flash-address 0x440000 (the application can be updated via the bootloader). When I set ".text=0x440000" in the "Project Properties -> Toolchain -> ARM/GNU Linker -> Memory Settings -> FLASH segment" for the application in Atmel Studio, do I have to additionally set the "Generate position-independent code" option (-fpic)? If yes, do I have to set this option for the Compiler AND the Linker? If no, are there any disadvantages when this option is set anyways?


Thank you in advance,