This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: position independent code on MIPS
- From: Ian Lance Taylor <ian at airs dot com>
- To: "Paul Kohout" <pkohout at evitechnology dot com>
- Cc: <gcc-help at gcc dot gnu dot org>
- Date: 16 Jan 2006 11:51:21 -0800
- Subject: Re: position independent code on MIPS
- References: <s3cb88ce.031@opal.evitechnology.com>
"Paul Kohout" <pkohout@evitechnology.com> writes:
> How do I generate position independent code using a gcc v4.0.2
> cross-compiler targeted for the mips-elf platform?
>
> In the past, I have used the -membedded-pic option with gcc v3.3.1, but
> this seems to have been deprecated in v4.0.2. I tried using the -fpic
> option, but it does not seem to create any dynamic relocation table
> entries for the .text section, just for data sections. Also, I've tried
> using the -mabicalls option, but I can't get it to work either.
It normally works to use -mabicalls -fpic -G 0.
But note that this is not the same as -membedded-pic.
Ian