add a prefix * into each ljmp/lcall operand only if GAS supports it.
This commit is contained in:
parent
c7b6b37e1d
commit
bec90507d7
10 changed files with 267 additions and 87 deletions
27
ChangeLog
27
ChangeLog
|
@ -1,3 +1,30 @@
|
|||
2000-05-31 OKUJI Yoshinori <okuji@gnu.org>
|
||||
|
||||
* 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 <chip@valinux.com>
|
||||
|
||||
* stage2/shared.h (grub_memmove): Prototype to use void *.
|
||||
|
|
|
@ -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
|
||||
|
|
29
acinclude.m4
29
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.
|
||||
|
|
29
aclocal.m4
vendored
29
aclocal.m4
vendored
|
@ -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.
|
||||
|
|
|
@ -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 <curses.h> header file. */
|
||||
#undef HAVE_CURSES_H
|
||||
|
||||
|
|
98
configure
vendored
98
configure
vendored
|
@ -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 <<EOF
|
||||
#line 1823 "configure"
|
||||
#line 1855 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
asm ("incl start")
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1830: \"$ac_link\") 1>&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 <<EOF
|
||||
#line 1859 "configure"
|
||||
#line 1891 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
asm ("incl _start")
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1866: \"$ac_link\") 1>&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 <<EOF
|
||||
#line 1900 "configure"
|
||||
#line 1932 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
asm ("incl __bss_start")
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1907: \"$ac_link\") 1>&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 <<EOF
|
||||
#line 1936 "configure"
|
||||
#line 1968 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
asm ("incl _edata")
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1943: \"$ac_link\") 1>&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 <<EOF
|
||||
#line 1972 "configure"
|
||||
#line 2004 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
asm ("incl edata")
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1979: \"$ac_link\") 1>&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 <<EOF
|
||||
#line 2014 "configure"
|
||||
#line 2046 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
asm ("incl end")
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2021: \"$ac_link\") 1>&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 <<EOF
|
||||
#line 2050 "configure"
|
||||
#line 2082 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
asm ("incl _end")
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2057: \"$ac_link\") 1>&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 <<EOF
|
||||
#line 2103 "configure"
|
||||
#line 2135 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
|
@ -2110,7 +2142,7 @@ int main() {
|
|||
opendisk()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2114: \"$ac_link\") 1>&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 <<EOF
|
||||
#line 2150 "configure"
|
||||
#line 2182 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
|
@ -2157,7 +2189,7 @@ int main() {
|
|||
wgetch()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2161: \"$ac_link\") 1>&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 <<EOF
|
||||
#line 2192 "configure"
|
||||
#line 2224 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
|
@ -2199,7 +2231,7 @@ int main() {
|
|||
wgetch()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2203: \"$ac_link\") 1>&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
|
||||
#line 2243 "configure"
|
||||
#line 2275 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
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*
|
||||
|
|
|
@ -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" \
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
12
stage2/asm.S
12
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
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue