On Tue, Jun 16, 2009 at 3:28 AM, Pavel Roskin
<address@hidden> wrote:
On Sat, 2009-05-30 at 16:46 +0200, Vladimir 'phcoder' Serbinenko wrote:
> +#ifdef APPLE_CC
> +#define MSG(x) x ## _abs = ABS(x); movw $x ## _abs, %si; call message
> +#else
> #define MSG(x) movw $ABS(x), %si; call message
> +#endif
I have verified that defining APPLE_CC on Fedora would produce exactly
the same bytecode. I don't see any reason to have preprocessor
conditionals all over the place. Are you trying to support as without
variables?
the problem is absolute adressing. Apple's AS issues a relocation directive for the code of type:
mov a-b, %eax
(probably because of possibility of external aliases)
which is then too complex for linker to resolve, that's why I needed to use constants as recommended by AS warning
> +#ifdef APPLE_CC
> + movl $(mmaphook_mmap_rel), %esi
> +#else
> movw $(DS(mmaphook_mmap)), %si
> +#endif
That's not an equivalent replacement. The argument width is different.
I know. Sometimes because of the quirks I had to replace some code with a less logical alternative which should however work in the flow
--
Regards,
Pavel Roskin
_______________________________________________
Grub-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/grub-devel