From bec90507d7c594c4112ad4c34cfac4d722a740d3 Mon Sep 17 00:00:00 2001 From: okuji Date: Wed, 31 May 2000 02:15:13 +0000 Subject: [PATCH] add a prefix * into each ljmp/lcall operand only if GAS supports it. --- ChangeLog | 27 +++++++++++++ acconfig.h | 3 ++ acinclude.m4 | 29 ++++++++++++++ aclocal.m4 | 29 ++++++++++++++ config.h.in | 3 ++ configure | 98 ++++++++++++++++++++++++++++++---------------- configure.in | 2 + netboot/pci.c | 56 ++++++++++++++++++++++---- stage2/Makefile.in | 95 ++++++++++++++++++++++---------------------- stage2/asm.S | 12 ++++++ 10 files changed, 267 insertions(+), 87 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5f8203a4d..eef141bea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,30 @@ +2000-05-31 OKUJI Yoshinori + + * acinclude.m4 (grub_ASM_ABSOLUTE_WITHOUT_ASTERISK): New + function. Check if GAS requires absolute indirect calls/jumps + with NO asterisk. + * configure.in: Call grub_ASM_ABSOLUTE_WITHOUT_ASTERISK. + * acconfig.h (ABSOLUTE_WITHOUT_ASTERISK): New macro entry. + * netboot/pci.c (bios32_service) [!ABSOLUTE_WITHOUT_ASTERISK]: + Prefix the operand to "lcall" with `*'. + (pcibios_read_config_byte) [!ABSOLUTE_WITHOUT_ASTERISK]: + Likewise. + (pcibios_read_config_word) [!ABSOLUTE_WITHOUT_ASTERISK]: + Likewise. + (pcibios_read_config_dword) [!ABSOLUTE_WITHOUT_ASTERISK]: + Likewise. + (pcibios_write_config_byte) [!ABSOLUTE_WITHOUT_ASTERISK]: + Likewise. + (pcibios_write_config_word) [!ABSOLUTE_WITHOUT_ASTERISK]: + Likewise. + (pcibios_write_config_dword) [!ABSOLUTE_WITHOUT_ASTERISK]: + Likewise. + (check_pcibios) [!ABSOLUTE_WITHOUT_ASTERISK]: Likewise. + * stage2/asm.S (chain_stage1) [!ABSOLUTE_WITHOUT_ASTERISK]: + Prefix the operand to "ljmp" with `*'. + (chain_stage2) [!ABSOLUTE_WITHOUT_ASTERISK]: Likewise. + (big_linux_boot) [!ABSOLUTE_WITHOUT_ASTERISK]: Likewise. + 2000-05-29 Chip Salzenberg * stage2/shared.h (grub_memmove): Prototype to use void *. diff --git a/acconfig.h b/acconfig.h index 218aa62e5..2b00dd2f8 100644 --- a/acconfig.h +++ b/acconfig.h @@ -24,3 +24,6 @@ /* Defined if _end is defined. */ #undef HAVE_USCORE_END_SYMBOL + +/* Defined if an absolute indirect call/jump must NOT be prefixed with `*'. */ +#undef ABSOLUTE_WITHOUT_ASTERISK diff --git a/acinclude.m4 b/acinclude.m4 index eeefa67fe..6b1da39b6 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -151,6 +151,35 @@ AC_DEFINE_UNQUOTED([DATA32], $grub_tmp_data32, AC_MSG_RESULT([$grub_cv_asm_prefix_requirement])]) +dnl +dnl Older versions of GAS require that absolute indirect calls/jumps are +dnl not prefixed with `*', while later versions warn if not prefixed. +AC_DEFUN(grub_ASM_ABSOLUTE_WITHOUT_ASTERISK, +[AC_REQUIRE([AC_PROG_CC]) +AC_MSG_CHECKING(dnl +[whether an absolute indirect call/jump must not be prefixed with an asterisk]) +AC_CACHE_VAL(grub_cv_asm_absolute_without_asterisk, +[cat > conftest.s <<\EOF + lcall *(offset) +offset: + .long 0 + .word 0 +EOF + +if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} -c conftest.s]) && test -s conftest.o; then + grub_cv_asm_absolute_without_asterisk=no +else + grub_cv_asm_absolute_without_asterisk=yes +fi + +rm -f conftest*]) + +if test "x$grub_cv_asm_absolute_without_asterisk" = xyes; then + AC_DEFINE([ABSOLUTE_WITHOUT_ASTERISK]) +fi + +AC_MSG_RESULT([$grub_cv_asm_absolute_without_asterisk])]) + dnl dnl grub_CHECK_START_SYMBOL checks if start is automatically defined by dnl the compiler. diff --git a/aclocal.m4 b/aclocal.m4 index e46577074..70f0eb6d2 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -163,6 +163,35 @@ AC_DEFINE_UNQUOTED([DATA32], $grub_tmp_data32, AC_MSG_RESULT([$grub_cv_asm_prefix_requirement])]) +dnl +dnl Older versions of GAS require that absolute indirect calls/jumps are +dnl not prefixed with `*', while later versions warn if not prefixed. +AC_DEFUN(grub_ASM_ABSOLUTE_WITHOUT_ASTERISK, +[AC_REQUIRE([AC_PROG_CC]) +AC_MSG_CHECKING(dnl +[whether an absolute indirect call/jump must not be prefixed with an asterisk]) +AC_CACHE_VAL(grub_cv_asm_absolute_without_asterisk, +[cat > conftest.s <<\EOF + lcall *(offset) +offset: + .long 0 + .word 0 +EOF + +if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} -c conftest.s]) && test -s conftest.o; then + grub_cv_asm_absolute_without_asterisk=no +else + grub_cv_asm_absolute_without_asterisk=yes +fi + +rm -f conftest*]) + +if test "x$grub_cv_asm_absolute_without_asterisk" = xyes; then + AC_DEFINE([ABSOLUTE_WITHOUT_ASTERISK]) +fi + +AC_MSG_RESULT([$grub_cv_asm_absolute_without_asterisk])]) + dnl dnl grub_CHECK_START_SYMBOL checks if start is automatically defined by dnl the compiler. diff --git a/config.h.in b/config.h.in index 7bd4b3e9b..56db8bd27 100644 --- a/config.h.in +++ b/config.h.in @@ -24,6 +24,9 @@ /* Defined if _end is defined. */ #undef HAVE_USCORE_END_SYMBOL +/* Defined if an absolute indirect call/jump must NOT be prefixed with `*'. */ +#undef ABSOLUTE_WITHOUT_ASTERISK + /* Define if you have the header file. */ #undef HAVE_CURSES_H diff --git a/configure b/configure index e100f65fd..ead247c41 100644 --- a/configure +++ b/configure @@ -1813,20 +1813,52 @@ if test "x$grub_cv_asm_addr32" != xyes; then fi +echo $ac_n "checking whether an absolute indirect call/jump must not be prefixed with an asterisk""... $ac_c" 1>&6 +echo "configure:1818: checking whether an absolute indirect call/jump must not be prefixed with an asterisk" >&5 +if eval "test \"`echo '$''{'grub_cv_asm_absolute_without_asterisk'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.s <<\EOF + lcall *(offset) +offset: + .long 0 + .word 0 +EOF + +if { ac_try='${CC-cc} ${CFLAGS} -c conftest.s'; { (eval echo configure:1829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.o; then + grub_cv_asm_absolute_without_asterisk=no +else + grub_cv_asm_absolute_without_asterisk=yes +fi + +rm -f conftest* +fi + + +if test "x$grub_cv_asm_absolute_without_asterisk" = xyes; then + cat >> confdefs.h <<\EOF +#define ABSOLUTE_WITHOUT_ASTERISK 1 +EOF + +fi + +echo "$ac_t""$grub_cv_asm_absolute_without_asterisk" 1>&6 + + echo $ac_n "checking if start is defined by the compiler""... $ac_c" 1>&6 -echo "configure:1818: checking if start is defined by the compiler" >&5 +echo "configure:1850: checking if start is defined by the compiler" >&5 if eval "test \"`echo '$''{'grub_cv_check_start_symbol'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* grub_cv_check_start_symbol=yes else @@ -1850,19 +1882,19 @@ echo "$ac_t""$grub_cv_check_start_symbol" 1>&6 echo $ac_n "checking if _start is defined by the compiler""... $ac_c" 1>&6 -echo "configure:1854: checking if _start is defined by the compiler" >&5 +echo "configure:1886: checking if _start is defined by the compiler" >&5 if eval "test \"`echo '$''{'grub_cv_check_uscore_start_symbol'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* grub_cv_check_uscore_start_symbol=yes else @@ -1891,19 +1923,19 @@ fi echo $ac_n "checking if __bss_start is defined by the compiler""... $ac_c" 1>&6 -echo "configure:1895: checking if __bss_start is defined by the compiler" >&5 +echo "configure:1927: checking if __bss_start is defined by the compiler" >&5 if eval "test \"`echo '$''{'grub_cv_check_uscore_uscore_bss_start_symbol'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* grub_cv_check_uscore_uscore_bss_start_symbol=yes else @@ -1927,19 +1959,19 @@ echo "$ac_t""$grub_cv_check_uscore_uscore_bss_start_symbol" 1>&6 echo $ac_n "checking if _edata is defined by the compiler""... $ac_c" 1>&6 -echo "configure:1931: checking if _edata is defined by the compiler" >&5 +echo "configure:1963: checking if _edata is defined by the compiler" >&5 if eval "test \"`echo '$''{'grub_cv_check_uscore_edata_symbol'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* grub_cv_check_uscore_edata_symbol=yes else @@ -1963,19 +1995,19 @@ echo "$ac_t""$grub_cv_check_uscore_edata_symbol" 1>&6 echo $ac_n "checking if edata is defined by the compiler""... $ac_c" 1>&6 -echo "configure:1967: checking if edata is defined by the compiler" >&5 +echo "configure:1999: checking if edata is defined by the compiler" >&5 if eval "test \"`echo '$''{'grub_cv_check_edata_symbol'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* grub_cv_check_edata_symbol=yes else @@ -2005,19 +2037,19 @@ fi echo $ac_n "checking if end is defined by the compiler""... $ac_c" 1>&6 -echo "configure:2009: checking if end is defined by the compiler" >&5 +echo "configure:2041: checking if end is defined by the compiler" >&5 if eval "test \"`echo '$''{'grub_cv_check_end_symbol'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* grub_cv_check_end_symbol=yes else @@ -2041,19 +2073,19 @@ echo "$ac_t""$grub_cv_check_end_symbol" 1>&6 echo $ac_n "checking if _end is defined by the compiler""... $ac_c" 1>&6 -echo "configure:2045: checking if _end is defined by the compiler" >&5 +echo "configure:2077: checking if _end is defined by the compiler" >&5 if eval "test \"`echo '$''{'grub_cv_check_uscore_end_symbol'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* grub_cv_check_uscore_end_symbol=yes else @@ -2091,7 +2123,7 @@ fi # Get the filename or the whole disk and open it. # Known to work on NetBSD. echo $ac_n "checking for opendisk in -lutil""... $ac_c" 1>&6 -echo "configure:2095: checking for opendisk in -lutil" >&5 +echo "configure:2127: checking for opendisk in -lutil" >&5 ac_lib_var=`echo util'_'opendisk | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2099,7 +2131,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lutil $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2138,7 +2170,7 @@ fi # Unless the user specify --without-curses, check for curses. if test "x$with_curses" != "xno"; then echo $ac_n "checking for wgetch in -lncurses""... $ac_c" 1>&6 -echo "configure:2142: checking for wgetch in -lncurses" >&5 +echo "configure:2174: checking for wgetch in -lncurses" >&5 ac_lib_var=`echo ncurses'_'wgetch | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2146,7 +2178,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2180,7 +2212,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for wgetch in -lcurses""... $ac_c" 1>&6 -echo "configure:2184: checking for wgetch in -lcurses" >&5 +echo "configure:2216: checking for wgetch in -lcurses" >&5 ac_lib_var=`echo curses'_'wgetch | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2188,7 +2220,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2234,17 +2266,17 @@ for ac_hdr in string.h strings.h ncurses/curses.h ncurses.h curses.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2238: checking for $ac_hdr" >&5 +echo "configure:2270: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2248: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2280: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* diff --git a/configure.in b/configure.in index fe09bbae1..9990419cd 100644 --- a/configure.in +++ b/configure.in @@ -116,6 +116,8 @@ if test "x$grub_cv_asm_addr32" != xyes; then AC_MSG_ERROR([GRUB requires GAS .code16 addr32 support; upgrade your binutils]) fi +grub_ASM_ABSOLUTE_WITHOUT_ASTERISK + grub_CHECK_START_SYMBOL grub_CHECK_USCORE_START_SYMBOL if test "x$grub_cv_check_start_symbol" != "xyes" \ diff --git a/netboot/pci.c b/netboot/pci.c index 485fd2aa8..c575cd17c 100644 --- a/netboot/pci.c +++ b/netboot/pci.c @@ -105,7 +105,12 @@ static unsigned long bios32_service(unsigned long service) unsigned long flags; save_flags(flags); - __asm__("lcall (%%edi)" + __asm__( +#ifndef ABSOLUTE_WITHOUT_ASTERISK + "lcall *(%%edi)" +#else + "lcall (%%edi)" +#endif : "=a" (return_code), "=b" (address), "=c" (length), @@ -136,7 +141,12 @@ int pcibios_read_config_byte(unsigned char bus, unsigned long flags; save_flags(flags); - __asm__("lcall (%%esi)\n\t" + __asm__( +#ifndef ABSOLUTE_WITHOUT_ASTERISK + "lcall *(%%esi)\n\t" +#else + "lcall (%%esi)\n\t" +#endif "jc 1f\n\t" "xor %%ah, %%ah\n" "1:" @@ -158,7 +168,12 @@ int pcibios_read_config_word(unsigned char bus, unsigned long flags; save_flags(flags); - __asm__("lcall (%%esi)\n\t" + __asm__( +#ifndef ABSOLUTE_WITHOUT_ASTERISK + "lcall *(%%esi)\n\t" +#else + "lcall (%%esi)\n\t" +#endif "jc 1f\n\t" "xor %%ah, %%ah\n" "1:" @@ -180,7 +195,12 @@ static int pcibios_read_config_dword(unsigned char bus, unsigned long flags; save_flags(flags); - __asm__("lcall (%%esi)\n\t" + __asm__( +#ifndef ABSOLUTE_WITHOUT_ASTERISK + "lcall *(%%esi)\n\t" +#else + "lcall (%%esi)\n\t" +#endif "jc 1f\n\t" "xor %%ah, %%ah\n" "1:" @@ -202,7 +222,12 @@ int pcibios_write_config_byte (unsigned char bus, unsigned long flags; save_flags(flags); cli(); - __asm__("lcall (%%esi)\n\t" + __asm__( +#ifndef ABSOLUTE_WITHOUT_ASTERISK + "lcall *(%%esi)\n\t" +#else + "lcall (%%esi)\n\t" +#endif "jc 1f\n\t" "xor %%ah, %%ah\n" "1:" @@ -224,7 +249,12 @@ int pcibios_write_config_word (unsigned char bus, unsigned long flags; save_flags(flags); cli(); - __asm__("lcall (%%esi)\n\t" + __asm__( +#ifndef ABSOLUTE_WITHOUT_ASTERISK + "lcall *(%%esi)\n\t" +#else + "lcall (%%esi)\n\t" +#endif "jc 1f\n\t" "xor %%ah, %%ah\n" "1:" @@ -246,7 +276,12 @@ int pcibios_write_config_dword (unsigned char bus, unsigned long flags; save_flags(flags); cli(); - __asm__("lcall (%%esi)\n\t" + __asm__( +#ifndef ABSOLUTE_WITHOUT_ASTERISK + "lcall *(%%esi)\n\t" +#else + "lcall (%%esi)\n\t" +#endif "jc 1f\n\t" "xor %%ah, %%ah\n" "1:" @@ -273,7 +308,12 @@ static void check_pcibios(void) pci_indirect.address = pcibios_entry; save_flags(flags); - __asm__("lcall (%%edi)\n\t" + __asm__( +#ifndef ABSOLUTE_WITHOUT_ASTERISK + "lcall *(%%edi)\n\t" +#else + "lcall (%%edi)\n\t" +#endif "jc 1f\n\t" "xor %%ah, %%ah\n" "1:\tshl $8, %%eax\n\t" diff --git a/stage2/Makefile.in b/stage2/Makefile.in index 39f5dcdd7..81ac51610 100644 --- a/stage2/Makefile.in +++ b/stage2/Makefile.in @@ -1346,54 +1346,57 @@ reiserfs_stage1_5_exec-bios.o: bios.c check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; \ srcdir=$(srcdir); export srcdir; \ - for tst in $(TESTS); do \ - if test -f ./$$tst; then dir=./; \ - elif test -f $$tst; then dir=; \ - else dir="$(srcdir)/"; fi; \ - if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *" $$tst "*) \ - xpass=`expr $$xpass + 1`; \ - failed=`expr $$failed + 1`; \ - echo "XPASS: $$tst"; \ - ;; \ - *) \ - echo "PASS: $$tst"; \ - ;; \ - esac; \ - elif test $$? -ne 77; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *" $$tst "*) \ - xfail=`expr $$xfail + 1`; \ - echo "XFAIL: $$tst"; \ - ;; \ - *) \ - failed=`expr $$failed + 1`; \ - echo "FAIL: $$tst"; \ - ;; \ - esac; \ - fi; \ - done; \ - if test "$$failed" -eq 0; then \ - if test "$$xfail" -eq 0; then \ - banner="All $$all tests passed"; \ + list='$(TESTS)'; \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *" $$tst "*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + echo "XPASS: $$tst"; \ + ;; \ + *) \ + echo "PASS: $$tst"; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *" $$tst "*) \ + xfail=`expr $$xfail + 1`; \ + echo "XFAIL: $$tst"; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + echo "FAIL: $$tst"; \ + ;; \ + esac; \ + fi; \ + done; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="All $$all tests passed"; \ + else \ + banner="All $$all tests behaved as expected ($$xfail expected failures)"; \ + fi; \ else \ - banner="All $$all tests behaved as expected ($$xfail expected failures)"; \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all tests failed"; \ + else \ + banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \ + fi; \ fi; \ - else \ - if test "$$xpass" -eq 0; then \ - banner="$$failed of $$all tests failed"; \ - else \ - banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \ - fi; \ - fi; \ - dashes=`echo "$$banner" | sed s/./=/g`; \ - echo "$$dashes"; \ - echo "$$banner"; \ - echo "$$dashes"; \ - test "$$failed" -eq 0 + dashes=`echo "$$banner" | sed s/./=/g`; \ + echo "$$dashes"; \ + echo "$$banner"; \ + echo "$$dashes"; \ + test "$$failed" -eq 0; \ + fi distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) diff --git a/stage2/asm.S b/stage2/asm.S index f95408ec9..fde156740 100644 --- a/stage2/asm.S +++ b/stage2/asm.S @@ -697,7 +697,11 @@ ENTRY(chain_stage1) call EXT_C(prot_to_real) .code16 +#ifdef ABSOLUTE_WITHOUT_ASTERISK DATA32 ADDR32 ljmp (offset) +#else + DATA32 ADDR32 ljmp *(offset) +#endif .code32 #endif /* STAGE1_5 */ @@ -737,7 +741,11 @@ ENTRY(chain_stage2) call EXT_C(prot_to_real) .code16 +#ifdef ABSOLUTE_WITHOUT_ASTERISK DATA32 ADDR32 ljmp (offset) +#else + DATA32 ADDR32 ljmp *(offset) +#endif .code32 #endif /* STAGE1_5 */ @@ -1654,7 +1662,11 @@ ENTRY(big_linux_boot) movw %ax, %ss /* jump to start */ +#ifdef ABSOLUTE_WITHOUT_ASTERISK DATA32 ADDR32 ljmp (offset) +#else + DATA32 ADDR32 ljmp *(offset) +#endif .code32