When I add the -fpie option to the compiler command line and the -pie option to the linker command line, I can build fine, but no longer debug my application - launching debug results in the following error (after a successful build):
Error launching <snip>:
Can't find executable file. It may need to be rebuilt.
Running the application results in an immediate crash. However, without PIC turned on, the application compiles/runs/debugs fine (until I need to use the position-independent features)
Hi
Position-independent executable is not supported by CodeWarrior, you can add this flags to your project, but if you check the disassembly code, this code still has absolute paths, moreover, you need to add special code loader which can understand where to place this code (as it suppose to be independent, it shouldn't have any specific address).
Sorry for the inconveniences that this may cause you.
Best regards