[Bug other/52885] Request: Add -aslr switch that invokes -fPIE/-pie or -fPIC/-shared as appropriate

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Apr 24 04:36:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52885

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-04-24 04:35:57 UTC ---
>Forgive my ignorance, but why does it matter at the code generation stage? 

Easy.  With PIE, global variables and functions are considered to bind local
while with PIC they are considered to bind globally (aka override able).


>At code generation, I did not think there was even the concept of program or shared object.

And this is where you are wrong.  GCC has a concept of program vs shared
library.



More information about the Gcc-bugs mailing list