Re: [PATCH 1/2] Relocator framework

2009-08-08 Thread Vladimir 'phcoder' Serbinenko
On Sat, Aug 8, 2009 at 5:52 AM, Pavel Roskin wrote: > On Fri, 2009-08-07 at 14:01 +0200, Vladimir 'phcoder' Serbinenko wrote: > >> Apple's compiler is based GCC but binutils aren't and they pose the >> most of problems. Actualy the most problematic bit was that I didn't >> know that unless you pref

Re: [PATCH 1/2] Relocator framework

2009-08-07 Thread Pavel Roskin
On Fri, 2009-08-07 at 14:01 +0200, Vladimir 'phcoder' Serbinenko wrote: > Apple's compiler is based GCC but binutils aren't and they pose the > most of problems. Actualy the most problematic bit was that I didn't > know that unless you prefix variable with L_ apple's assembler treats > it as globa

Re: [PATCH 1/2] Relocator framework

2009-08-07 Thread Vladimir 'phcoder' Serbinenko
On Fri, Aug 7, 2009 at 1:16 PM, Marco Gerards wrote: > Robert Millan writes: > > [...] > >>> Apple linker can't handle 64-bit differences >> >> This seems like a bug.  Can GNU binutils be used on MacOS to resolve this? >> >> If it's workable, I'd rather make binutils a build requirement than addin

Re: [PATCH 1/2] Relocator framework

2009-08-07 Thread Marco Gerards
Robert Millan writes: [...] >> Apple linker can't handle 64-bit differences > > This seems like a bug. Can GNU binutils be used on MacOS to resolve this? > > If it's workable, I'd rather make binutils a build requirement than adding > more of this (the other APPLE_CC ifdefs will probably need s

Re: [PATCH 1/2] Relocator framework

2009-08-07 Thread Robert Millan
On Wed, Aug 05, 2009 at 12:18:17PM +0200, Vladimir 'phcoder' Serbinenko wrote: > >> +#ifdef __x86_64__ > >> +extern grub_uint64_t grub_relocator32_backward_src; > >> +#else > >> +extern grub_uint32_t grub_relocator32_backward_src; > >> +#endif > > > > You could make this a pointer, or grub_uintptr_

Re: [PATCH 1/2] Relocator framework

2009-08-05 Thread Vladimir 'phcoder' Serbinenko
>> +#ifdef __x86_64__ >> +extern grub_uint64_t grub_relocator32_backward_src; >> +#else >> +extern grub_uint32_t grub_relocator32_backward_src; >> +#endif > > You could make this a pointer, or grub_uintptr_t > (the latter we don't yet have, it seems like a good excuse to > add it if a pointer is no

Re: [PATCH 1/2] Relocator framework

2009-08-04 Thread Robert Millan
On Mon, Aug 03, 2009 at 02:06:03PM +0200, Vladimir 'phcoder' Serbinenko wrote: > Hello. As discussed on IRC it would be preferable if all loaders use > flexible technics for loading kernels using relocators as currently > multiboot and xnu does. Well, as for what I said on IRC, I'm not sure if it'

Re: [PATCH 1/2] Relocator framework

2009-08-03 Thread Vladimir 'phcoder' Serbinenko
On Mon, Aug 3, 2009 at 2:06 PM, Vladimir 'phcoder' Serbinenko wrote: > Hello. As discussed on IRC it would be preferable if all loaders use > flexible technics for loading kernels using relocators as currently > multiboot and xnu does. Here is a relocator framework based on > multiboot and xnu relo

[PATCH 1/2] Relocator framework

2009-08-03 Thread Vladimir 'phcoder' Serbinenko
Hello. As discussed on IRC it would be preferable if all loaders use flexible technics for loading kernels using relocators as currently multiboot and xnu does. Here is a relocator framework based on multiboot and xnu relocator. As an advantage it switches from x86-64 to i386 if necessary. With it