[2038] 2009-03-22 Pavel Roskin <[email protected]>

Pavel Roskin <[email protected]>
Newsgroups gmane.comp.boot-loaders.grub.cvs
Message-ID <[email protected]>
Revision: 2038
          http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=2038
Author:   proski
Date:     2009-03-22 00:31:30 +0000 (Sun, 22 Mar 2009)
Log Message:
-----------
2009-03-22  Pavel Roskin  <[email protected]>

	* 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.

Modified Paths:
--------------
    trunk/grub2/ChangeLog
    trunk/grub2/aclocal.m4
    trunk/grub2/config.h.in
    trunk/grub2/configure
    trunk/grub2/configure.ac
    trunk/grub2/kern/i386/pc/startup.S

Modified: trunk/grub2/ChangeLog
===================================================================
--- trunk/grub2/ChangeLog	2009-03-21 23:02:12 UTC (rev 2037)
+++ trunk/grub2/ChangeLog	2009-03-22 00:31:30 UTC (rev 2038)
@@ -1,3 +1,9 @@
+2009-03-22  Pavel Roskin  <[email protected]>
+
+	* 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  <[email protected]>
 
 	Bugfixes in multiboot for bugs uncovered by solaris kernel.

Modified: trunk/grub2/aclocal.m4
===================================================================
--- trunk/grub2/aclocal.m4	2009-03-21 23:02:12 UTC (rev 2037)
+++ trunk/grub2/aclocal.m4	2009-03-22 00:31:30 UTC (rev 2038)
@@ -224,39 +224,6 @@
 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,

Modified: trunk/grub2/config.h.in
===================================================================
--- trunk/grub2/config.h.in	2009-03-21 23:02:12 UTC (rev 2037)
+++ trunk/grub2/config.h.in	2009-03-22 00:31:30 UTC (rev 2038)
@@ -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
 

Modified: trunk/grub2/configure
===================================================================
--- trunk/grub2/configure	2009-03-21 23:02:12 UTC (rev 2037)
+++ trunk/grub2/configure	2009-03-22 00:31:30 UTC (rev 2038)
@@ -7270,134 +7270,6 @@
   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

Modified: trunk/grub2/configure.ac
===================================================================
--- trunk/grub2/configure.ac	2009-03-21 23:02:12 UTC (rev 2037)
+++ trunk/grub2/configure.ac	2009-03-22 00:31:30 UTC (rev 2038)
@@ -383,7 +383,6 @@
     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

Modified: trunk/grub2/kern/i386/pc/startup.S
===================================================================
--- trunk/grub2/kern/i386/pc/startup.S	2009-03-21 23:02:12 UTC (rev 2037)
+++ trunk/grub2/kern/i386/pc/startup.S	2009-03-22 00:31:30 UTC (rev 2038)
@@ -202,7 +202,7 @@
 #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 @@
 	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 @@
 	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 @@
 	.long	0
 
 VARIABLE(grub_start_addr)
-	.long	START_SYMBOL
+	.long	_start
 
 VARIABLE(grub_end_addr)
 	.long	END_SYMBOL
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.