On Mon, Jul 21, 2008 at 3:02 PM, Bean <[EMAIL PROTECTED]> wrote: > On Mon, Jul 21, 2008 at 4:51 AM, Christian Franke > <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> >> >> * 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. > > Hi, > > 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 > gcc. > > Perhaps you can write a small tool, which fix various bugs after using > objcopy to generate the module file.
Hi, BTW, if you have time, you can consider writing a tool that convert pe to elf directly, thus avoiding objcopy altogether. This shouldn't be too difficult, you can take a look at util/i386/efi/grub-mkimage.c, which does exactly the opposite, converting elf to pe32. -- Bean _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel