This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: about -fpic/-fPIC option for gcc
- From: Ian Lance Taylor <iant at google dot com>
- To: Lin George <george4academic at yahoo dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: 05 Sep 2006 08:22:58 -0700
- Subject: Re: about -fpic/-fPIC option for gcc
- References: <20060903082142.76358.qmail@web32115.mail.mud.yahoo.com>
Lin George <george4academic@yahoo.com> writes:
> I am confused about the meaning and function of -fpic
> and -fPIC option of gcc. I am more confused when after
> reading the manual of gcc (for example, what means
> PIC, GOT, constant addresses, etc.). Could anyone
> explain to me what are their functions in easy to
> understand words?
If we could write it better, we would.
Very short and incomplete version which may suffice for your purposes:
the -fpic and -fPIC options are for generating code that will be put
into a shared library on an ELF system. GNU/Linux is an example of an
ELF system.
Ian