Fix compilation on cygwin.
* conf/Makefile.common (STRIPFLAGS_KERNEL): Add -F elf32-i386 and -R .drectve on cygwin. * conf/i386-pc-cygwin-img-ld.sc: Merge rdata and pdata into data. * configure.ac: Use $(top_builddir) in TARGET_OBJ2ELF. (COND_CYGWIN): New condition. * grub-core/Makefile.am (%.mod): Set TARGET_OBJ2ELF. * grub-core/genmod.sh.in: Use ${TARGET_OBJ2ELF} and not @TARGET_OBJ2ELF@. * util/grub-pe2elf.c (write_symbol_table): Use pe_symtab->type and not type to determine whether aux is to be used.
This commit is contained in:
parent
0b5e127b0d
commit
f1632d4dd0
7 changed files with 25 additions and 11 deletions
15
ChangeLog
15
ChangeLog
|
@ -1,3 +1,18 @@
|
||||||
|
2011-01-13 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
Fix compilation on cygwin.
|
||||||
|
|
||||||
|
* conf/Makefile.common (STRIPFLAGS_KERNEL): Add -F elf32-i386 and
|
||||||
|
-R .drectve on cygwin.
|
||||||
|
* conf/i386-pc-cygwin-img-ld.sc: Merge rdata and pdata into data.
|
||||||
|
* configure.ac: Use $(top_builddir) in TARGET_OBJ2ELF.
|
||||||
|
(COND_CYGWIN): New condition.
|
||||||
|
* grub-core/Makefile.am (%.mod): Set TARGET_OBJ2ELF.
|
||||||
|
* grub-core/genmod.sh.in: Use ${TARGET_OBJ2ELF} and
|
||||||
|
not @TARGET_OBJ2ELF@.
|
||||||
|
* util/grub-pe2elf.c (write_symbol_table): Use pe_symtab->type and not
|
||||||
|
type to determine whether aux is to be used.
|
||||||
|
|
||||||
2011-01-12 Vladimir Serbinenko <phcoder@gmail.com>
|
2011-01-12 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* util/ieee1275/ofpath.c (grub_util_devname_to_ofpath): Use the
|
* util/ieee1275/ofpath.c (grub_util_devname_to_ofpath): Use the
|
||||||
|
|
|
@ -67,7 +67,11 @@ CFLAGS_KERNEL = $(CFLAGS_CPU) $(CFLAGS_PLATFORM) -ffreestanding
|
||||||
LDFLAGS_KERNEL = $(LDFLAGS_CPU) $(LDFLAGS_PLATFORM) -nostdlib -Wl,-N -static-libgcc
|
LDFLAGS_KERNEL = $(LDFLAGS_CPU) $(LDFLAGS_PLATFORM) -nostdlib -Wl,-N -static-libgcc
|
||||||
CPPFLAGS_KERNEL = $(CPPFLAGS_CPU) $(CPPFLAGS_PLATFORM)
|
CPPFLAGS_KERNEL = $(CPPFLAGS_CPU) $(CPPFLAGS_PLATFORM)
|
||||||
CCASFLAGS_KERNEL = $(CCASFLAGS_CPU) $(CCASFLAGS_PLATFORM)
|
CCASFLAGS_KERNEL = $(CCASFLAGS_CPU) $(CCASFLAGS_PLATFORM)
|
||||||
|
if COND_CYGWIN
|
||||||
|
STRIPFLAGS_KERNEL = -F elf32-i386 -R .rel.dyn -R .reginfo -R .note -R .comment -R .drectve
|
||||||
|
else
|
||||||
STRIPFLAGS_KERNEL = -R .rel.dyn -R .reginfo -R .note -R .comment
|
STRIPFLAGS_KERNEL = -R .rel.dyn -R .reginfo -R .note -R .comment
|
||||||
|
endif
|
||||||
|
|
||||||
CFLAGS_MODULE = $(CFLAGS_CPU) $(CFLAGS_PLATFORM) -ffreestanding
|
CFLAGS_MODULE = $(CFLAGS_CPU) $(CFLAGS_PLATFORM) -ffreestanding
|
||||||
LDFLAGS_MODULE = $(LDFLAGS_CPU) $(LDFLAGS_PLATFORM) -nostdlib -Wl,-N,-r,-d
|
LDFLAGS_MODULE = $(LDFLAGS_CPU) $(LDFLAGS_PLATFORM) -nostdlib -Wl,-N,-r,-d
|
||||||
|
|
|
@ -13,15 +13,9 @@ SECTIONS
|
||||||
__data_start__ = . ;
|
__data_start__ = . ;
|
||||||
*(.data)
|
*(.data)
|
||||||
__data_end__ = . ;
|
__data_end__ = . ;
|
||||||
}
|
|
||||||
.rdata :
|
|
||||||
{
|
|
||||||
__rdata_start__ = . ;
|
__rdata_start__ = . ;
|
||||||
*(.rdata)
|
*(.rdata)
|
||||||
__rdata_end__ = . ;
|
__rdata_end__ = . ;
|
||||||
}
|
|
||||||
.pdata :
|
|
||||||
{
|
|
||||||
*(.pdata)
|
*(.pdata)
|
||||||
edata = . ;
|
edata = . ;
|
||||||
}
|
}
|
||||||
|
|
|
@ -454,7 +454,7 @@ fi
|
||||||
# For platforms where ELF is not the default link format.
|
# For platforms where ELF is not the default link format.
|
||||||
AC_MSG_CHECKING([for command to convert module to ELF format])
|
AC_MSG_CHECKING([for command to convert module to ELF format])
|
||||||
case "${host_os}" in
|
case "${host_os}" in
|
||||||
cygwin) TARGET_OBJ2ELF='$(grub_utildir)/grub-pe2elf';
|
cygwin) TARGET_OBJ2ELF='$(top_builddir)/grub-pe2elf';
|
||||||
# FIXME: put proper test here
|
# FIXME: put proper test here
|
||||||
NEED_REGISTER_FRAME_INFO=1
|
NEED_REGISTER_FRAME_INFO=1
|
||||||
;;
|
;;
|
||||||
|
@ -964,6 +964,7 @@ AM_CONDITIONAL([COND_APPLE_CC], [test x$TARGET_APPLE_CC = x1])
|
||||||
AM_CONDITIONAL([COND_ENABLE_EFIEMU], [test x$enable_efiemu = xyes])
|
AM_CONDITIONAL([COND_ENABLE_EFIEMU], [test x$enable_efiemu = xyes])
|
||||||
|
|
||||||
AM_CONDITIONAL([COND_HAVE_ASM_USCORE], [test x$HAVE_ASM_USCORE = x1])
|
AM_CONDITIONAL([COND_HAVE_ASM_USCORE], [test x$HAVE_ASM_USCORE = x1])
|
||||||
|
AM_CONDITIONAL([COND_CYGWIN], [test x$host_os = xcygwin])
|
||||||
|
|
||||||
# Output files.
|
# Output files.
|
||||||
grub_CHECK_LINK_DIR
|
grub_CHECK_LINK_DIR
|
||||||
|
|
|
@ -303,7 +303,7 @@ platform_DATA += moddep.lst
|
||||||
CLEANFILES += config.log syminfo.lst moddep.lst
|
CLEANFILES += config.log syminfo.lst moddep.lst
|
||||||
|
|
||||||
$(MOD_FILES): %.mod : genmod.sh moddep.lst %.module$(EXEEXT)
|
$(MOD_FILES): %.mod : genmod.sh moddep.lst %.module$(EXEEXT)
|
||||||
sh $^ $@
|
TARGET_OBJ2ELF=@TARGET_OBJ2ELF@ sh $^ $@
|
||||||
platform_DATA += $(MOD_FILES)
|
platform_DATA += $(MOD_FILES)
|
||||||
CLEANFILES += $(MOD_FILES)
|
CLEANFILES += $(MOD_FILES)
|
||||||
|
|
||||||
|
|
|
@ -52,8 +52,8 @@ fi
|
||||||
rm -f $t1 $t2
|
rm -f $t1 $t2
|
||||||
|
|
||||||
if test x@TARGET_APPLE_CC@ != x1; then
|
if test x@TARGET_APPLE_CC@ != x1; then
|
||||||
if ! test -z "@TARGET_OBJ2ELF@"; then
|
if ! test -z "${TARGET_OBJ2ELF}"; then
|
||||||
./@TARGET_OBJ2ELF@ $tmpfile || exit 1
|
./${TARGET_OBJ2ELF} $tmpfile || exit 1
|
||||||
fi
|
fi
|
||||||
if test x@platform@ != xemu; then
|
if test x@platform@ != xemu; then
|
||||||
@STRIP@ --strip-unneeded \
|
@STRIP@ --strip-unneeded \
|
||||||
|
|
|
@ -337,7 +337,7 @@ write_symbol_table (FILE* fp, char *image,
|
||||||
else
|
else
|
||||||
bind = STB_LOCAL;
|
bind = STB_LOCAL;
|
||||||
|
|
||||||
if ((type != STT_FUNC) && (pe_symtab->num_aux))
|
if ((pe_symtab->type != GRUB_PE32_DT_FUNCTION) && (pe_symtab->num_aux))
|
||||||
{
|
{
|
||||||
if (! pe_symtab->value)
|
if (! pe_symtab->value)
|
||||||
type = STT_SECTION;
|
type = STT_SECTION;
|
||||||
|
|
Loading…
Reference in a new issue