grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ppc patch] grub-mkimage


From: Johan Rydberg
Subject: Re: [ppc patch] grub-mkimage
Date: Fri, 03 Dec 2004 14:49:35 +0100
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Marco Gerards <address@hidden> writes:

> For some reason my REL24 code does not work, when it does I will send
> in a patch.  But there are 3 options we should consider:
>
> - Making sure REL24 should not be used.  This can be done using the
>   -mlongcall option.  Still, after using this the module will not work
>   when it uses libraries, this is a gcc bug that has been fixed last
>   week.  The library that we use is libgcc.  If we choose for
>   eliminating all calls to libgcc and if we use -mlongcall the
>   relocator will work.  The disadvantage of this solution is that the
>   modules will get a bit bigger.
>
> - It is possible to fix the relocator just to use PPC_REL24, but in
>   that case the module should be loaded near grubof.
>
> - What linux uses is jumping to some code near the module and that
>   code does a long jump into grubof.  This is the hardest solution and
>   I don't yet have enough knowledge to do this.
>
> I am now trying to get option 2 to work first (by using black magic to
> get everything loaded at the right address ;)) and when module loading
> works for me I will try to make 3 work.  Does someone else think I
> try to do something else, or can someone help a bit somehow?  As you
> might have noticed I really suck at this stuff and doing it just
> because no one else does. ;)

If I'm not mistaken, you're using the regular SVR4 ABI for PPC.  It
might be a good idea to take a look at the EABI (Embedded ABI) [1]

I'm not sure if you have to re-configure GCC to make it EABI-compat,
or if there's a configuration switch for this.  Anyway, as I said,
it might be worth looking into.

Cheers,
Johan.

 [1] ftp://sources.redhat.com/pub/binutils/ppc-docs/ppc-eabi-1995-01.pdf







reply via email to

[Prev in Thread] Current Thread [Next in Thread]