Dear ST support,
The same issue is met here:
STM32 GCC generated code with -fPIC option ONLY uses indirect addressing through the Global Offset Table to access global variables.
Function calls are still preformed using an absolute address to the function instead of using an address found in the GOT.
In addition, the generated code addresses the GOT with an absolute address instead of using an offset to the GOT.
As a result, it appears “fPIC” functionality is NOT fully implemented. Or maybe some other compilation options should be used ?
Otherwise, is the full implementation scheduled ?
Note: our current project includes a driver for which the code must NOT change. To be free from the flash mapping, the idea was to have the application copy the got just after the driver in flash at a fixed “offset” (and not an absolute address). But with the function call and the GOT addressing state of the art, it seems not possible.
Thanks for your help,