title: Creating and uploading PIC in GCC
body: <p>Suppose I wish to create position independent code which will be dynamically loaded by a MCU.</p>
  <p>GCC allows for compiling PIC but I am unsure what the process is to get the final binary output.</p>
  <p>To clarify, suppose I have implemented a C function which is self contained(no global var). I have a separate RTOS on my MCU which will downloaded this function and run it at a specific address.</p>
  <p>What is the process for compiling this function and getting the binary image to upload to the MCU? What would my linker script look like in this case?</p>