------- Comment #3 from pinskia at gcc dot gnu dot org  2008-03-07 19:47 -------
(In reply to comment #2)
> But DSOs still work if I don't use PIC. Why is that?

Depends on the target :).  If this is x86, then you can guess why.  In fact
x86_64 errors out when linking if you did not use -fPIC (or -fpic).

> Why would anybody want to create position-independent executable? What are the
> advantages and disadvantages?

Security, random addresses for the text section.


-- 


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

Reply via email to