public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: position independent code on MIPS
@ 2006-01-16 20:29 Paul Kohout
  0 siblings, 0 replies; 4+ messages in thread
From: Paul Kohout @ 2006-01-16 20:29 UTC (permalink / raw)
  To: ian; +Cc: gcc-help

I see. So the -mabicalls is the only way to get the code position
independent.

So what would a dynamic linker have to do differently using "-mabicalls
-fpic -G 0" versus "-membedded-pic"? I assume that there would be some
processing of relocation tables. Is this documented somewhere?

Thanks again,
-Paul

>>> Ian Lance Taylor <ian@airs.com> 01/16/06 2:51 PM >>>
"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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: position independent code on MIPS
       [not found] <s3cbbbe1.059@opal.evitechnology.com>
@ 2006-01-17  3:43 ` Ian Lance Taylor
  0 siblings, 0 replies; 4+ messages in thread
From: Ian Lance Taylor @ 2006-01-17  3:43 UTC (permalink / raw)
  To: Paul Kohout; +Cc: gcc-help

"Paul Kohout" <pkohout@evitechnology.com> writes:

> So what would a dynamic linker have to do differently using "-mabicalls
> -fpic -G 0" versus "-membedded-pic"? I assume that there would be some
> processing of relocation tables. Is this documented somewhere?

The -mabicalls case works with ELF.  See the MIPS ELF Processor
Supplement:
    http://refspecs.freestandards.org/elf/mipsabi.pdf

The -membedded-pic case works with a very simpleminded format I
designed a long time ago.

Ian

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: position independent code on MIPS
  2006-01-16 16:51 Paul Kohout
@ 2006-01-16 19:51 ` Ian Lance Taylor
  0 siblings, 0 replies; 4+ messages in thread
From: Ian Lance Taylor @ 2006-01-16 19:51 UTC (permalink / raw)
  To: Paul Kohout; +Cc: gcc-help

"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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* position independent code on MIPS
@ 2006-01-16 16:51 Paul Kohout
  2006-01-16 19:51 ` Ian Lance Taylor
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Kohout @ 2006-01-16 16:51 UTC (permalink / raw)
  To: gcc-help

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.

Any help would be greatly appreciated.

Thanks,
Paul

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-01-17  3:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-16 20:29 position independent code on MIPS Paul Kohout
     [not found] <s3cbbbe1.059@opal.evitechnology.com>
2006-01-17  3:43 ` Ian Lance Taylor
  -- strict thread matches above, loose matches on Subject: below --
2006-01-16 16:51 Paul Kohout
2006-01-16 19:51 ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).