I need to know if using -s in GCC (g++) will have any effects on the PIE. I also want to know its effects on a position-dependent executable. As far as I know, not using any linking option (like -pie and -fpie) results in a non-PIE just like when using -no-pie. Now I have an executable and that's probably non-PIE since I have not specified -pie in the link command. Can -s
cause any problems? Will it improve the performance (since the exe will be smaller)?
I also checked this question and in the answer it says:
It seems pretty clear that removing relocation information would interfere with ASLR.
But ASLR only deals with position-independent executables, right? Could removing relocation data from a position-dependent executable interfere with ASLR?