This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: m68k pic bug
- To: Andreas Schwab <schwab at suse dot de>
- Subject: Re: m68k pic bug
- From: John_W_Marshall at palm dot com
- Date: Mon, 18 Oct 1999 12:03:45 -0700
- cc: egcs at egcs dot cygnus dot com (egcs)
Andreas Schwab <schwab@suse.de> writes:
> John Marshall <john_w_marshall@palm.com> writes:
>|>Would it be appropriate to add
>|> && ! fixed_regs[PIC_OFFSET_TABLE_REGNUM]
>|> to your patch(es)? That would solve PalmOS's problem.
>
> The pic register is always fixed if -fpic.
Good point -- so of course it wouldn't be appropriate.
Oh. I remember now (*blush*). You save/restore the pic register because
you then initialise it in the prologue to point to the GOT. But on PalmOS
there is no GOT, just a register fixed by the OS (think Macintosh A5-world),
so we hacked around that initialisation. So I can continue to hack around
this too.
Hmmm... there must be a better way. Are there other ports that do PIC
without a GOT that I should look at for ideas? I'll just go away and
think about it some more now...
Thanks,
John