From 41473ac27fbf2f650be516d83b98ec962a6ce377 Mon Sep 17 00:00:00 2001 From: proski Date: Sun, 22 Mar 2009 00:31:30 +0000 Subject: [PATCH] 2009-03-22 Pavel Roskin * 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. --- ChangeLog | 6 ++ aclocal.m4 | 33 ----------- config.h.in | 3 - configure | 128 ----------------------------------------- configure.ac | 1 - kern/i386/pc/startup.S | 8 +-- 6 files changed, 10 insertions(+), 169 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2d317818a..3edfedc03 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-03-22 Pavel Roskin + + * 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 Bugfixes in multiboot for bugs uncovered by solaris kernel. diff --git a/aclocal.m4 b/aclocal.m4 index 3c72ca9ec..b54ef15db 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -224,39 +224,6 @@ fi 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 Written by Michael Hohmoth and Yoshinori K. Okuji. AC_DEFUN(grub_CHECK_BSS_START_SYMBOL, diff --git a/config.h.in b/config.h.in index 91e9615f8..c110d6307 100644 --- a/config.h.in +++ b/config.h.in @@ -109,9 +109,6 @@ /* The size of `void *', as computed by sizeof. */ #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. */ #undef STDC_HEADERS diff --git a/configure b/configure index f77ebf839..128317982 100644 --- a/configure +++ b/configure @@ -7270,134 +7270,6 @@ if test "x$target_cpu" = xi386; then fi 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 $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 diff --git a/configure.ac b/configure.ac index d9f182d4a..80b499cec 100644 --- a/configure.ac +++ b/configure.ac @@ -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" fi if test "x$platform" = xpc; then - grub_CHECK_START_SYMBOL grub_CHECK_BSS_START_SYMBOL grub_CHECK_END_SYMBOL fi diff --git a/kern/i386/pc/startup.S b/kern/i386/pc/startup.S index 18f61d801..7ebe592e4 100644 --- a/kern/i386/pc/startup.S +++ b/kern/i386/pc/startup.S @@ -202,7 +202,7 @@ codestart: #if defined(ENABLE_LZO) /* decompress the compressed part and put the result at 1MB */ 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 EXT_C(grub_compressed_size) @@ -214,7 +214,7 @@ codestart: cld #elif defined(ENABLE_LZMA) 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 %esi 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_kernel_image_size), %esi addl %ecx, %esi - addl $START_SYMBOL, %esi + addl $_start, %esi decl %esi movl $END_SYMBOL, %edi addl %ecx, %edi @@ -282,7 +282,7 @@ VARIABLE(grub_root_drive) .long 0 VARIABLE(grub_start_addr) - .long START_SYMBOL + .long _start VARIABLE(grub_end_addr) .long END_SYMBOL