2009-03-22 Pavel Roskin <proski@gno.org>
* aclocal.m4 (grub_CHECK_START_SYMBOL): Remove. * configure.ac: Don't call grub_CHECK_START_SYMBOL. * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
This commit is contained in:
parent
2274cc8fc9
commit
41473ac27f
6 changed files with 10 additions and 169 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2009-03-22 Pavel Roskin <proski@gno.org>
|
||||||
|
|
||||||
|
* aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
|
||||||
|
* configure.ac: Don't call grub_CHECK_START_SYMBOL.
|
||||||
|
* kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
|
||||||
|
|
||||||
2009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
|
2009-03-21 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
Bugfixes in multiboot for bugs uncovered by solaris kernel.
|
Bugfixes in multiboot for bugs uncovered by solaris kernel.
|
||||||
|
|
33
aclocal.m4
vendored
33
aclocal.m4
vendored
|
@ -224,39 +224,6 @@ fi
|
||||||
AC_MSG_RESULT([$grub_cv_i386_asm_absolute_without_asterisk])])
|
AC_MSG_RESULT([$grub_cv_i386_asm_absolute_without_asterisk])])
|
||||||
|
|
||||||
|
|
||||||
dnl Check what symbol is defined as a start symbol.
|
|
||||||
dnl Written by Yoshinori K. Okuji.
|
|
||||||
AC_DEFUN(grub_CHECK_START_SYMBOL,
|
|
||||||
[AC_REQUIRE([AC_PROG_CC])
|
|
||||||
AC_MSG_CHECKING([if start is defined by the compiler])
|
|
||||||
AC_CACHE_VAL(grub_cv_check_start_symbol,
|
|
||||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],
|
|
||||||
[[asm ("incl start")]])],
|
|
||||||
[grub_cv_check_start_symbol=yes],
|
|
||||||
[grub_cv_check_start_symbol=no])])
|
|
||||||
|
|
||||||
AC_MSG_RESULT([$grub_cv_check_start_symbol])
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([if _start is defined by the compiler])
|
|
||||||
AC_CACHE_VAL(grub_cv_check_uscore_start_symbol,
|
|
||||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],
|
|
||||||
[[asm ("incl _start")]])],
|
|
||||||
[grub_cv_check_uscore_start_symbol=yes],
|
|
||||||
[grub_cv_check_uscore_start_symbol=no])])
|
|
||||||
|
|
||||||
AC_MSG_RESULT([$grub_cv_check_uscore_start_symbol])
|
|
||||||
|
|
||||||
AH_TEMPLATE([START_SYMBOL], [Define it to either start or _start])
|
|
||||||
|
|
||||||
if test "x$grub_cv_check_start_symbol" = xyes; then
|
|
||||||
AC_DEFINE([START_SYMBOL], [start])
|
|
||||||
elif test "x$grub_cv_check_uscore_start_symbol" = xyes; then
|
|
||||||
AC_DEFINE([START_SYMBOL], [_start])
|
|
||||||
else
|
|
||||||
AC_MSG_ERROR([neither start nor _start is defined])
|
|
||||||
fi
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl Check what symbol is defined as a bss start symbol.
|
dnl Check what symbol is defined as a bss start symbol.
|
||||||
dnl Written by Michael Hohmoth and Yoshinori K. Okuji.
|
dnl Written by Michael Hohmoth and Yoshinori K. Okuji.
|
||||||
AC_DEFUN(grub_CHECK_BSS_START_SYMBOL,
|
AC_DEFUN(grub_CHECK_BSS_START_SYMBOL,
|
||||||
|
|
|
@ -109,9 +109,6 @@
|
||||||
/* The size of `void *', as computed by sizeof. */
|
/* The size of `void *', as computed by sizeof. */
|
||||||
#undef SIZEOF_VOID_P
|
#undef SIZEOF_VOID_P
|
||||||
|
|
||||||
/* Define it to either start or _start */
|
|
||||||
#undef START_SYMBOL
|
|
||||||
|
|
||||||
/* Define to 1 if you have the ANSI C header files. */
|
/* Define to 1 if you have the ANSI C header files. */
|
||||||
#undef STDC_HEADERS
|
#undef STDC_HEADERS
|
||||||
|
|
||||||
|
|
128
configure
vendored
128
configure
vendored
|
@ -7270,134 +7270,6 @@ if test "x$target_cpu" = xi386; then
|
||||||
fi
|
fi
|
||||||
if test "x$platform" = xpc; then
|
if test "x$platform" = xpc; then
|
||||||
|
|
||||||
{ echo "$as_me:$LINENO: checking if start is defined by the compiler" >&5
|
|
||||||
echo $ECHO_N "checking if start is defined by the compiler... $ECHO_C" >&6; }
|
|
||||||
if test "${grub_cv_check_start_symbol+set}" = set; then
|
|
||||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
|
||||||
else
|
|
||||||
cat >conftest.$ac_ext <<_ACEOF
|
|
||||||
/* confdefs.h. */
|
|
||||||
_ACEOF
|
|
||||||
cat confdefs.h >>conftest.$ac_ext
|
|
||||||
cat >>conftest.$ac_ext <<_ACEOF
|
|
||||||
/* end confdefs.h. */
|
|
||||||
|
|
||||||
int
|
|
||||||
main ()
|
|
||||||
{
|
|
||||||
asm ("incl start")
|
|
||||||
;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
_ACEOF
|
|
||||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
|
||||||
if { (ac_try="$ac_link"
|
|
||||||
case "(($ac_try" in
|
|
||||||
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
|
||||||
*) ac_try_echo=$ac_try;;
|
|
||||||
esac
|
|
||||||
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
|
||||||
(eval "$ac_link") 2>conftest.er1
|
|
||||||
ac_status=$?
|
|
||||||
grep -v '^ *+' conftest.er1 >conftest.err
|
|
||||||
rm -f conftest.er1
|
|
||||||
cat conftest.err >&5
|
|
||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
|
||||||
(exit $ac_status); } && {
|
|
||||||
test -z "$ac_c_werror_flag" ||
|
|
||||||
test ! -s conftest.err
|
|
||||||
} && test -s conftest$ac_exeext &&
|
|
||||||
$as_test_x conftest$ac_exeext; then
|
|
||||||
grub_cv_check_start_symbol=yes
|
|
||||||
else
|
|
||||||
echo "$as_me: failed program was:" >&5
|
|
||||||
sed 's/^/| /' conftest.$ac_ext >&5
|
|
||||||
|
|
||||||
grub_cv_check_start_symbol=no
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
|
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
{ echo "$as_me:$LINENO: result: $grub_cv_check_start_symbol" >&5
|
|
||||||
echo "${ECHO_T}$grub_cv_check_start_symbol" >&6; }
|
|
||||||
|
|
||||||
{ echo "$as_me:$LINENO: checking if _start is defined by the compiler" >&5
|
|
||||||
echo $ECHO_N "checking if _start is defined by the compiler... $ECHO_C" >&6; }
|
|
||||||
if test "${grub_cv_check_uscore_start_symbol+set}" = set; then
|
|
||||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
|
||||||
else
|
|
||||||
cat >conftest.$ac_ext <<_ACEOF
|
|
||||||
/* confdefs.h. */
|
|
||||||
_ACEOF
|
|
||||||
cat confdefs.h >>conftest.$ac_ext
|
|
||||||
cat >>conftest.$ac_ext <<_ACEOF
|
|
||||||
/* end confdefs.h. */
|
|
||||||
|
|
||||||
int
|
|
||||||
main ()
|
|
||||||
{
|
|
||||||
asm ("incl _start")
|
|
||||||
;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
_ACEOF
|
|
||||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
|
||||||
if { (ac_try="$ac_link"
|
|
||||||
case "(($ac_try" in
|
|
||||||
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
|
||||||
*) ac_try_echo=$ac_try;;
|
|
||||||
esac
|
|
||||||
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
|
||||||
(eval "$ac_link") 2>conftest.er1
|
|
||||||
ac_status=$?
|
|
||||||
grep -v '^ *+' conftest.er1 >conftest.err
|
|
||||||
rm -f conftest.er1
|
|
||||||
cat conftest.err >&5
|
|
||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
|
||||||
(exit $ac_status); } && {
|
|
||||||
test -z "$ac_c_werror_flag" ||
|
|
||||||
test ! -s conftest.err
|
|
||||||
} && test -s conftest$ac_exeext &&
|
|
||||||
$as_test_x conftest$ac_exeext; then
|
|
||||||
grub_cv_check_uscore_start_symbol=yes
|
|
||||||
else
|
|
||||||
echo "$as_me: failed program was:" >&5
|
|
||||||
sed 's/^/| /' conftest.$ac_ext >&5
|
|
||||||
|
|
||||||
grub_cv_check_uscore_start_symbol=no
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
|
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
{ echo "$as_me:$LINENO: result: $grub_cv_check_uscore_start_symbol" >&5
|
|
||||||
echo "${ECHO_T}$grub_cv_check_uscore_start_symbol" >&6; }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if test "x$grub_cv_check_start_symbol" = xyes; then
|
|
||||||
cat >>confdefs.h <<\_ACEOF
|
|
||||||
#define START_SYMBOL start
|
|
||||||
_ACEOF
|
|
||||||
|
|
||||||
elif test "x$grub_cv_check_uscore_start_symbol" = xyes; then
|
|
||||||
cat >>confdefs.h <<\_ACEOF
|
|
||||||
#define START_SYMBOL _start
|
|
||||||
_ACEOF
|
|
||||||
|
|
||||||
else
|
|
||||||
{ { echo "$as_me:$LINENO: error: neither start nor _start is defined" >&5
|
|
||||||
echo "$as_me: error: neither start nor _start is defined" >&2;}
|
|
||||||
{ (exit 1); exit 1; }; }
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
{ echo "$as_me:$LINENO: checking if __bss_start is defined by the compiler" >&5
|
{ echo "$as_me:$LINENO: checking if __bss_start is defined by the compiler" >&5
|
||||||
echo $ECHO_N "checking if __bss_start is defined by the compiler... $ECHO_C" >&6; }
|
echo $ECHO_N "checking if __bss_start is defined by the compiler... $ECHO_C" >&6; }
|
||||||
if test "${grub_cv_check_uscore_uscore_bss_start_symbol+set}" = set; then
|
if test "${grub_cv_check_uscore_uscore_bss_start_symbol+set}" = set; then
|
||||||
|
|
|
@ -383,7 +383,6 @@ if test "x$target_cpu" = xi386; then
|
||||||
CFLAGS="$TARGET_CFLAGS -nostdlib $TARGET_IMG_LDFLAGS_AC -Wl,-Ttext,8000,--defsym,___main=0x8100"
|
CFLAGS="$TARGET_CFLAGS -nostdlib $TARGET_IMG_LDFLAGS_AC -Wl,-Ttext,8000,--defsym,___main=0x8100"
|
||||||
fi
|
fi
|
||||||
if test "x$platform" = xpc; then
|
if test "x$platform" = xpc; then
|
||||||
grub_CHECK_START_SYMBOL
|
|
||||||
grub_CHECK_BSS_START_SYMBOL
|
grub_CHECK_BSS_START_SYMBOL
|
||||||
grub_CHECK_END_SYMBOL
|
grub_CHECK_END_SYMBOL
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -202,7 +202,7 @@ codestart:
|
||||||
#if defined(ENABLE_LZO)
|
#if defined(ENABLE_LZO)
|
||||||
/* decompress the compressed part and put the result at 1MB */
|
/* decompress the compressed part and put the result at 1MB */
|
||||||
movl $GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR, %esi
|
movl $GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR, %esi
|
||||||
movl $(START_SYMBOL + GRUB_KERNEL_MACHINE_RAW_SIZE), %edi
|
movl $(_start + GRUB_KERNEL_MACHINE_RAW_SIZE), %edi
|
||||||
|
|
||||||
pushl %esi
|
pushl %esi
|
||||||
pushl EXT_C(grub_compressed_size)
|
pushl EXT_C(grub_compressed_size)
|
||||||
|
@ -214,7 +214,7 @@ codestart:
|
||||||
cld
|
cld
|
||||||
#elif defined(ENABLE_LZMA)
|
#elif defined(ENABLE_LZMA)
|
||||||
movl $GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR, %edi
|
movl $GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR, %edi
|
||||||
movl $(START_SYMBOL + GRUB_KERNEL_MACHINE_RAW_SIZE), %esi
|
movl $(_start + GRUB_KERNEL_MACHINE_RAW_SIZE), %esi
|
||||||
pushl %edi
|
pushl %edi
|
||||||
pushl %esi
|
pushl %esi
|
||||||
movl EXT_C(grub_kernel_image_size), %ecx
|
movl EXT_C(grub_kernel_image_size), %ecx
|
||||||
|
@ -239,7 +239,7 @@ codestart:
|
||||||
movl EXT_C(grub_total_module_size), %ecx
|
movl EXT_C(grub_total_module_size), %ecx
|
||||||
movl EXT_C(grub_kernel_image_size), %esi
|
movl EXT_C(grub_kernel_image_size), %esi
|
||||||
addl %ecx, %esi
|
addl %ecx, %esi
|
||||||
addl $START_SYMBOL, %esi
|
addl $_start, %esi
|
||||||
decl %esi
|
decl %esi
|
||||||
movl $END_SYMBOL, %edi
|
movl $END_SYMBOL, %edi
|
||||||
addl %ecx, %edi
|
addl %ecx, %edi
|
||||||
|
@ -282,7 +282,7 @@ VARIABLE(grub_root_drive)
|
||||||
.long 0
|
.long 0
|
||||||
|
|
||||||
VARIABLE(grub_start_addr)
|
VARIABLE(grub_start_addr)
|
||||||
.long START_SYMBOL
|
.long _start
|
||||||
|
|
||||||
VARIABLE(grub_end_addr)
|
VARIABLE(grub_end_addr)
|
||||||
.long END_SYMBOL
|
.long END_SYMBOL
|
||||||
|
|
Loading…
Reference in a new issue