[Top][All Lists]

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

Re: [PATCH] Kernel fixes for Cygwin

From: Bean
Subject: Re: [PATCH] Kernel fixes for Cygwin
Date: Mon, 21 Jul 2008 15:02:33 +0800

On Mon, Jul 21, 2008 at 4:51 AM, Christian Franke
<address@hidden> wrote:
> This adds Cygwin support to kernel sources. It handles the issues introduced
> by PE->ELF conversion and adds support for HAVE_ASM_USCORE.
> Christian
> 2007-07-20      Christian Franke  <address@hidden>
>        * include/grub/dl.h: Remove .previous, gas supports this only
>        for ELF format.
>        * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
>        Remove .type, gas supports this only for ELF format.
>        * kern/dl.c (grub_dl_resolve_symbols): Add check for grub_mod_init
>        and grub_mod_fini for symbols without a type. Handle HAVE_ASM_USCORE
>        case for these symbols.
>        (grub_dl_resolve_dependencies): Add check for trailing nullbytes
>        in symbol table. This fixes an infinite loop if table is zero filled.
>        * kern/i386/dl.c [__CYGWIN__] (fix_pc_rel_relocation): New function
>        to fix bad PC relative relocation produced by objcopy.
>        [__CYGWIN__] (grub_arch_dl_relocate_symbols): Add fix of PC relative
> relocation.
>        (grub_arch_dl_relocate_symbols): Abort on unknown relocation type.


I'm not fond of fixing elf relocation bug in dl.c. First of all, this
is an objcopy bug, it may be changed in the future, also, it makes
modules compiled by cygwin not compatible with those compiled by elf

Perhaps you can write a small tool, which fix various bugs after using
objcopy to generate the module file.


reply via email to

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