diff options
Diffstat (limited to 'ld')
274 files changed, 6051 insertions, 226 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index a25a9e5..4fe4a54 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,16 @@ +2001-10-30 Hans-Peter Nilsson <hp@bitrange.com> + + * configure.tgt (mmix-*-*): New target. + * Makefile.am (ALL_EMULATIONS): Add eelf64mmix.o and emmo.o. + Add dependencies to match. + * emulparams/mmo.sh, emulparams/elf64mmix.sh, emultempl/mmo.em, + emultempl/mmix-elfnmmo.em, emultempl/mmixelf.em, + scripttempl/mmo.sc: New files. + * gen-doc.texi: @set MMIX. + * ld.texinfo: Ditto. + [MMIX] Add MMIX node. + * Makefile.in: Regenerate. + 2001-10-29 Kazu Hirata <kazu@hxi.com> * ldlang.c: Fix a comment typo. diff --git a/ld/Makefile.am b/ld/Makefile.am index ec617f1..ce82eaa 100644 --- a/ld/Makefile.am +++ b/ld/Makefile.am @@ -265,6 +265,8 @@ ALL_64_EMULATIONS = \ eelf64btsmip.o \ eelf64ltsmip.o \ eelf64hppa.o \ + eelf64mmix.o \ + emmo.o \ eelf64ppc.o \ eelf64lppc.o \ eaixppc64.o \ @@ -537,6 +539,14 @@ eelf64_sparc.c: $(srcdir)/emulparams/elf64_sparc.sh \ eelf64bmip.c: $(srcdir)/emulparams/elf64bmip.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf64bmip "$(tdir_elf64bmip)" +eelf64mmix.c: $(srcdir)/emulparams/elf64mmix.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/mmix-elfnmmo.em \ + $(srcdir)/emultempl/mmixelf.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf64mmix "$(tdir_elf64mmix)" +emmo.c: $(srcdir)/emulparams/mmo.sh $(srcdir)/emultempl/mmix-elfnmmo.em \ + $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mmo.em \ + $(srcdir)/scripttempl/mmo.sc ${GEN_DEPENDS} + ${GENSCRIPTS} mmo "$(tdir_mmo)" eelf64btsmip.c: $(srcdir)/emulparams/elf64btsmip.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf64btsmip "$(tdir_elf64btsmip)" diff --git a/ld/Makefile.in b/ld/Makefile.in index 77f94c7..f1187d8 100644 --- a/ld/Makefile.in +++ b/ld/Makefile.in @@ -1,6 +1,6 @@ -# Makefile.in generated automatically by automake 1.4 from Makefile.am +# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am -# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -374,6 +374,8 @@ ALL_64_EMULATIONS = \ eelf64btsmip.o \ eelf64ltsmip.o \ eelf64hppa.o \ + eelf64mmix.o \ + emmo.o \ eelf64ppc.o \ eelf64lppc.o \ eaixppc64.o \ @@ -481,7 +483,7 @@ deffilep.c ldgram.c ldlex.c DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar GZIP_ENV = --best SOURCES = $(ld_new_SOURCES) $(EXTRA_ld_new_SOURCES) OBJECTS = $(ld_new_OBJECTS) @@ -666,7 +668,7 @@ uninstall-info: else ii=; fi; \ list='$(INFO_DEPS)'; \ for file in $$list; do \ - test -z "$ii" \ + test -z "$$ii" \ || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \ done @$(NORMAL_UNINSTALL) @@ -779,7 +781,7 @@ maintainer-clean-recursive: dot_seen=no; \ rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ rev="$$subdir $$rev"; \ - test "$$subdir" = "." && dot_seen=yes; \ + test "$$subdir" != "." || dot_seen=yes; \ done; \ test "$$dot_seen" = "no" && rev=". $$rev"; \ target=`echo $@ | sed s/-recursive//`; \ @@ -1251,6 +1253,14 @@ eelf64_sparc.c: $(srcdir)/emulparams/elf64_sparc.sh \ eelf64bmip.c: $(srcdir)/emulparams/elf64bmip.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf64bmip "$(tdir_elf64bmip)" +eelf64mmix.c: $(srcdir)/emulparams/elf64mmix.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/mmix-elfnmmo.em \ + $(srcdir)/emultempl/mmixelf.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf64mmix "$(tdir_elf64mmix)" +emmo.c: $(srcdir)/emulparams/mmo.sh $(srcdir)/emultempl/mmix-elfnmmo.em \ + $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mmo.em \ + $(srcdir)/scripttempl/mmo.sc ${GEN_DEPENDS} + ${GENSCRIPTS} mmo "$(tdir_mmo)" eelf64btsmip.c: $(srcdir)/emulparams/elf64btsmip.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf64btsmip "$(tdir_elf64btsmip)" diff --git a/ld/configure b/ld/configure index 60ef2bf..de5a9fd 100755 --- a/ld/configure +++ b/ld/configure @@ -53,7 +53,6 @@ program_suffix=NONE program_transform_name=s,x,x, silent= site= -sitefile= srcdir= target=NONE verbose= @@ -168,7 +167,6 @@ Configuration: --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages - --site-file=FILE use FILE as the site file --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX @@ -339,11 +337,6 @@ EOF -site=* | --site=* | --sit=*) site="$ac_optarg" ;; - -site-file | --site-file | --site-fil | --site-fi | --site-f) - ac_prev=sitefile ;; - -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) - sitefile="$ac_optarg" ;; - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) @@ -509,16 +502,12 @@ fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. -if test -z "$sitefile"; then - if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi -else - CONFIG_SITE="$sitefile" fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then @@ -557,12 +546,12 @@ else fi echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:561: checking for Cygwin environment" >&5 +echo "configure:550: checking for Cygwin environment" >&5 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 566 "configure" +#line 555 "configure" #include "confdefs.h" int main() { @@ -573,7 +562,7 @@ int main() { return __CYGWIN__; ; return 0; } EOF -if { (eval echo configure:577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -590,19 +579,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6 CYGWIN= test "$ac_cv_cygwin" = yes && CYGWIN=yes echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:594: checking for mingw32 environment" >&5 +echo "configure:583: checking for mingw32 environment" >&5 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 599 "configure" +#line 588 "configure" #include "confdefs.h" int main() { return __MINGW32__; ; return 0; } EOF -if { (eval echo configure:606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -667,7 +656,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:671: checking host system type" >&5 +echo "configure:660: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -688,7 +677,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:692: checking target system type" >&5 +echo "configure:681: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -706,7 +695,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:710: checking build system type" >&5 +echo "configure:699: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -730,7 +719,7 @@ test "$host_alias" != "$target_alias" && echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6 -echo "configure:734: checking for strerror in -lcposix" >&5 +echo "configure:723: checking for strerror in -lcposix" >&5 ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -738,7 +727,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcposix $LIBS" cat > conftest.$ac_ext <<EOF -#line 742 "configure" +#line 731 "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 @@ -749,7 +738,7 @@ int main() { strerror() ; return 0; } EOF -if { (eval echo configure:753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:742: \"$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 @@ -785,7 +774,7 @@ BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:789: checking for a BSD compatible install" >&5 +echo "configure:778: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -838,7 +827,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:842: checking whether build environment is sane" >&5 +echo "configure:831: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -895,7 +884,7 @@ test "$program_suffix" != NONE && test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:899: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:888: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -941,7 +930,7 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:945: checking for working aclocal" >&5 +echo "configure:934: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -954,7 +943,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:958: checking for working autoconf" >&5 +echo "configure:947: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -967,7 +956,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:971: checking for working automake" >&5 +echo "configure:960: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -980,7 +969,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:984: checking for working autoheader" >&5 +echo "configure:973: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -993,7 +982,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:997: checking for working makeinfo" >&5 +echo "configure:986: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1079,7 +1068,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1083: checking for $ac_word" >&5 +echo "configure:1072: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1109,7 +1098,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1113: checking for $ac_word" >&5 +echo "configure:1102: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1160,7 +1149,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1164: checking for $ac_word" >&5 +echo "configure:1153: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1192,7 +1181,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1196: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1185: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1203,12 +1192,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1207 "configure" +#line 1196 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1234,12 +1223,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1238: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1227: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1243: checking whether we are using GNU C" >&5 +echo "configure:1232: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1248,7 +1237,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1267,7 +1256,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1271: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1260: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1310,7 +1299,7 @@ ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:1314: checking for ld used by GCC" >&5 +echo "configure:1303: checking for ld used by GCC" >&5 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw @@ -1340,10 +1329,10 @@ echo "configure:1314: checking for ld used by GCC" >&5 esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:1344: checking for GNU ld" >&5 +echo "configure:1333: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1347: checking for non-GNU ld" >&5 +echo "configure:1336: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1378,7 +1367,7 @@ else fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:1382: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:1371: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1395,7 +1384,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 -echo "configure:1399: checking for $LD option to reload object files" >&5 +echo "configure:1388: checking for $LD option to reload object files" >&5 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1407,7 +1396,7 @@ reload_flag=$lt_cv_ld_reload_flag test -n "$reload_flag" && reload_flag=" $reload_flag" echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:1411: checking for BSD-compatible nm" >&5 +echo "configure:1400: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1445,7 +1434,7 @@ NM="$lt_cv_path_NM" echo "$ac_t""$NM" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1449: checking whether ln -s works" >&5 +echo "configure:1438: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1466,7 +1455,7 @@ else fi echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 -echo "configure:1470: checking how to recognise dependant libraries" >&5 +echo "configure:1459: checking how to recognise dependant libraries" >&5 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1630,13 +1619,13 @@ file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method echo $ac_n "checking for object suffix""... $ac_c" 1>&6 -echo "configure:1634: checking for object suffix" >&5 +echo "configure:1623: checking for object suffix" >&5 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* echo 'int i = 1;' > conftest.$ac_ext -if { (eval echo configure:1640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; @@ -1656,7 +1645,7 @@ ac_objext=$ac_cv_objext echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:1660: checking for executable suffix" >&5 +echo "configure:1649: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1666,10 +1655,10 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:1670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:1659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in - *.c | *.o | *.obj | *.ilk | *.pdb) ;; + *.c | *.o | *.obj) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done @@ -1699,7 +1688,7 @@ case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 -echo "configure:1703: checking for ${ac_tool_prefix}file" >&5 +echo "configure:1692: checking for ${ac_tool_prefix}file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1761,7 +1750,7 @@ fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo $ac_n "checking for file""... $ac_c" 1>&6 -echo "configure:1765: checking for file" >&5 +echo "configure:1754: checking for file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1832,7 +1821,7 @@ esac # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1836: checking for $ac_word" >&5 +echo "configure:1825: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1864,7 +1853,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1868: checking for $ac_word" >&5 +echo "configure:1857: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1899,7 +1888,7 @@ fi # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1903: checking for $ac_word" >&5 +echo "configure:1892: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1931,7 +1920,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1935: checking for $ac_word" >&5 +echo "configure:1924: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1998,8 +1987,8 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic" case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 2002 "configure"' > conftest.$ac_ext - if { (eval echo configure:2003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 1991 "configure"' > conftest.$ac_ext + if { (eval echo configure:1992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" @@ -2020,7 +2009,7 @@ case $host in SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -echo "configure:2024: checking whether the C compiler needs -belf" >&5 +echo "configure:2013: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2033,14 +2022,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <<EOF -#line 2037 "configure" +#line 2026 "configure" #include "confdefs.h" int main() { ; return 0; } EOF -if { (eval echo configure:2044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else @@ -2217,7 +2206,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2221: checking for $ac_word" >&5 +echo "configure:2210: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2247,7 +2236,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2251: checking for $ac_word" >&5 +echo "configure:2240: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2298,7 +2287,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2302: checking for $ac_word" >&5 +echo "configure:2291: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2330,7 +2319,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2334: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:2323: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -2341,12 +2330,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 2345 "configure" +#line 2334 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -2372,12 +2361,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2376: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2365: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:2381: checking whether we are using GNU C" >&5 +echo "configure:2370: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2386,7 +2375,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2390: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2379: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -2405,7 +2394,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:2409: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:2398: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2448,7 +2437,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:2452: checking for a BSD compatible install" >&5 +echo "configure:2441: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2503,7 +2492,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' ALL_LINGUAS= echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2507: checking how to run the C preprocessor" >&5 +echo "configure:2496: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2518,13 +2507,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext <<EOF -#line 2522 "configure" +#line 2511 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2528: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2517: \"$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 : @@ -2535,13 +2524,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 2539 "configure" +#line 2528 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2545: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2534: \"$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 : @@ -2552,13 +2541,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext <<EOF -#line 2556 "configure" +#line 2545 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2562: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2551: \"$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 : @@ -2585,7 +2574,7 @@ echo "$ac_t""$CPP" 1>&6 # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2589: checking for $ac_word" >&5 +echo "configure:2578: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2613,12 +2602,12 @@ else fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2617: checking for ANSI C header files" >&5 +echo "configure:2606: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2622 "configure" +#line 2611 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -2626,7 +2615,7 @@ else #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2630: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2619: \"$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* @@ -2643,7 +2632,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 2647 "configure" +#line 2636 "configure" #include "confdefs.h" #include <string.h> EOF @@ -2661,7 +2650,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 2665 "configure" +#line 2654 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -2682,7 +2671,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <<EOF -#line 2686 "configure" +#line 2675 "configure" #include "confdefs.h" #include <ctype.h> #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2693,7 +2682,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2717,12 +2706,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2721: checking for working const" >&5 +echo "configure:2710: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2726 "configure" +#line 2715 "configure" #include "confdefs.h" int main() { @@ -2771,7 +2760,7 @@ ccp = (char const *const *) p; ; return 0; } EOF -if { (eval echo configure:2775: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2792,21 +2781,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:2796: checking for inline" >&5 +echo "configure:2785: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <<EOF -#line 2803 "configure" +#line 2792 "configure" #include "confdefs.h" int main() { } $ac_kw foo() { ; return 0; } EOF -if { (eval echo configure:2810: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -2832,12 +2821,12 @@ EOF esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:2836: checking for off_t" >&5 +echo "configure:2825: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2841 "configure" +#line 2830 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -2865,12 +2854,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2869: checking for size_t" >&5 +echo "configure:2858: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2874 "configure" +#line 2863 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -2900,19 +2889,19 @@ fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:2904: checking for working alloca.h" >&5 +echo "configure:2893: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2909 "configure" +#line 2898 "configure" #include "confdefs.h" #include <alloca.h> int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:2916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -2933,12 +2922,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:2937: checking for alloca" >&5 +echo "configure:2926: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2942 "configure" +#line 2931 "configure" #include "confdefs.h" #ifdef __GNUC__ @@ -2966,7 +2955,7 @@ int main() { char *p = (char *) alloca(1); ; return 0; } EOF -if { (eval echo configure:2970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -2998,12 +2987,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:3002: checking whether alloca needs Cray hooks" >&5 +echo "configure:2991: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3007 "configure" +#line 2996 "configure" #include "confdefs.h" #if defined(CRAY) && ! defined(CRAY2) webecray @@ -3028,12 +3017,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3032: checking for $ac_func" >&5 +echo "configure:3021: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3037 "configure" +#line 3026 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3056,7 +3045,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3083,7 +3072,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:3087: checking stack direction for C alloca" >&5 +echo "configure:3076: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3091,7 +3080,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <<EOF -#line 3095 "configure" +#line 3084 "configure" #include "confdefs.h" find_stack_direction () { @@ -3110,7 +3099,7 @@ main () exit (find_stack_direction() < 0); } EOF -if { (eval echo configure:3114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -3131,21 +3120,21 @@ EOF fi -for ac_hdr in unistd.h +for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3139: checking for $ac_hdr" >&5 +echo "configure:3128: 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 3144 "configure" +#line 3133 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3149: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3138: \"$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* @@ -3174,12 +3163,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3178: checking for $ac_func" >&5 +echo "configure:3167: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3183 "configure" +#line 3172 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3202,7 +3191,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3227,7 +3216,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:3231: checking for working mmap" >&5 +echo "configure:3220: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3235,7 +3224,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <<EOF -#line 3239 "configure" +#line 3228 "configure" #include "confdefs.h" /* Thanks to Mike Haertel and Jim Avera for this test. @@ -3263,11 +3252,24 @@ else #include <fcntl.h> #include <sys/mman.h> +#if HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif + +#if HAVE_STDLIB_H +# include <stdlib.h> +#endif + +#if HAVE_SYS_STAT_H +# include <sys/stat.h> +#endif + +#if HAVE_UNISTD_H +# include <unistd.h> +#endif + /* This mess was copied from the GNU getpagesize.h. */ #ifndef HAVE_GETPAGESIZE -# ifdef HAVE_UNISTD_H -# include <unistd.h> -# endif /* Assume that all systems that can run configure have sys/param.h. */ # ifndef HAVE_SYS_PARAM_H @@ -3375,7 +3377,7 @@ main() } EOF -if { (eval echo configure:3379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -3403,17 +3405,17 @@ unistd.h values.h sys/param.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3407: checking for $ac_hdr" >&5 +echo "configure:3409: 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 3412 "configure" +#line 3414 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3417: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3419: \"$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* @@ -3443,12 +3445,12 @@ done __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3447: checking for $ac_func" >&5 +echo "configure:3449: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3452 "configure" +#line 3454 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3471,7 +3473,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3500,12 +3502,12 @@ done for ac_func in stpcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3504: checking for $ac_func" >&5 +echo "configure:3506: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3509 "configure" +#line 3511 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3528,7 +3530,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3562,19 +3564,19 @@ EOF if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:3566: checking for LC_MESSAGES" >&5 +echo "configure:3568: checking for LC_MESSAGES" >&5 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3571 "configure" +#line 3573 "configure" #include "confdefs.h" #include <locale.h> int main() { return LC_MESSAGES ; return 0; } EOF -if { (eval echo configure:3578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_val_LC_MESSAGES=yes else @@ -3595,7 +3597,7 @@ EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:3599: checking whether NLS is requested" >&5 +echo "configure:3601: checking whether NLS is requested" >&5 # Check whether --enable-nls or --disable-nls was given. if test "${enable_nls+set}" = set; then enableval="$enable_nls" @@ -3615,7 +3617,7 @@ fi EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:3619: checking whether included gettext is requested" >&5 +echo "configure:3621: checking whether included gettext is requested" >&5 # Check whether --with-included-gettext or --without-included-gettext was given. if test "${with_included_gettext+set}" = set; then withval="$with_included_gettext" @@ -3634,17 +3636,17 @@ fi ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:3638: checking for libintl.h" >&5 +echo "configure:3640: checking for libintl.h" >&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 3643 "configure" +#line 3645 "configure" #include "confdefs.h" #include <libintl.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3648: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3650: \"$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* @@ -3661,19 +3663,19 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 -echo "configure:3665: checking for gettext in libc" >&5 +echo "configure:3667: checking for gettext in libc" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3670 "configure" +#line 3672 "configure" #include "confdefs.h" #include <libintl.h> int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:3677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libc=yes else @@ -3689,7 +3691,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 if test "$gt_cv_func_gettext_libc" != "yes"; then echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 -echo "configure:3693: checking for bindtextdomain in -lintl" >&5 +echo "configure:3695: checking for bindtextdomain in -lintl" >&5 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3697,7 +3699,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <<EOF -#line 3701 "configure" +#line 3703 "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 @@ -3708,7 +3710,7 @@ int main() { bindtextdomain() ; return 0; } EOF -if { (eval echo configure:3712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3714: \"$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 @@ -3724,19 +3726,19 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 -echo "configure:3728: checking for gettext in libintl" >&5 +echo "configure:3730: checking for gettext in libintl" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3733 "configure" +#line 3735 "configure" #include "confdefs.h" int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:3740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libintl=yes else @@ -3764,7 +3766,7 @@ EOF # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3768: checking for $ac_word" >&5 +echo "configure:3770: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3798,12 +3800,12 @@ fi for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3802: checking for $ac_func" >&5 +echo "configure:3804: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3807 "configure" +#line 3809 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3826,7 +3828,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3853,7 +3855,7 @@ done # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3857: checking for $ac_word" >&5 +echo "configure:3859: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3889,7 +3891,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3893: checking for $ac_word" >&5 +echo "configure:3895: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3921,7 +3923,7 @@ else fi cat > conftest.$ac_ext <<EOF -#line 3925 "configure" +#line 3927 "configure" #include "confdefs.h" int main() { @@ -3929,7 +3931,7 @@ extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr ; return 0; } EOF -if { (eval echo configure:3933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -3961,7 +3963,7 @@ fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3965: checking for $ac_word" >&5 +echo "configure:3967: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3995,7 +3997,7 @@ fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3999: checking for $ac_word" >&5 +echo "configure:4001: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4031,7 +4033,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4035: checking for $ac_word" >&5 +echo "configure:4037: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4121,7 +4123,7 @@ fi LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:4125: checking for catalogs to be installed" >&5 +echo "configure:4127: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -4149,17 +4151,17 @@ echo "configure:4125: checking for catalogs to be installed" >&5 if test "$CATOBJEXT" = ".cat"; then ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 -echo "configure:4153: checking for linux/version.h" >&5 +echo "configure:4155: checking for linux/version.h" >&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 4158 "configure" +#line 4160 "configure" #include "confdefs.h" #include <linux/version.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4165: \"$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* @@ -4224,7 +4226,7 @@ fi echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:4228: checking for executable suffix" >&5 +echo "configure:4230: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4234,10 +4236,10 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:4238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:4240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in - *.c | *.o | *.obj | *.ilk | *.pdb) ;; + *.c | *.o | *.obj) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done @@ -4260,7 +4262,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4264: checking for $ac_word" >&5 +echo "configure:4266: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4296,7 +4298,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4300: checking for $ac_word" >&5 +echo "configure:4302: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4329,7 +4331,7 @@ test -n "$LEX" || LEX=""$missing_dir/missing flex"" # Extract the first word of "flex", so it can be a program name with args. set dummy flex; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4333: checking for $ac_word" >&5 +echo "configure:4335: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4363,7 +4365,7 @@ then *) ac_lib=l ;; esac echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 -echo "configure:4367: checking for yywrap in -l$ac_lib" >&5 +echo "configure:4369: checking for yywrap in -l$ac_lib" >&5 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4371,7 +4373,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$ac_lib $LIBS" cat > conftest.$ac_ext <<EOF -#line 4375 "configure" +#line 4377 "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 @@ -4382,7 +4384,7 @@ int main() { yywrap() ; return 0; } EOF -if { (eval echo configure:4386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4388: \"$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 @@ -4405,7 +4407,7 @@ fi fi echo $ac_n "checking lex output file root""... $ac_c" 1>&6 -echo "configure:4409: checking lex output file root" >&5 +echo "configure:4411: checking lex output file root" >&5 if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4426,7 +4428,7 @@ echo "$ac_t""$ac_cv_prog_lex_root" 1>&6 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6 -echo "configure:4430: checking whether yytext is a pointer" >&5 +echo "configure:4432: checking whether yytext is a pointer" >&5 if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4438,14 +4440,14 @@ echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c ac_save_LIBS="$LIBS" LIBS="$LIBS $LEXLIB" cat > conftest.$ac_ext <<EOF -#line 4442 "configure" +#line 4444 "configure" #include "confdefs.h" `cat $LEX_OUTPUT_ROOT.c` int main() { ; return 0; } EOF -if { (eval echo configure:4449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_prog_lex_yytext_pointer=yes else @@ -4468,7 +4470,7 @@ fi echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:4472: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:4474: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" @@ -4502,17 +4504,17 @@ for ac_hdr in string.h strings.h stdlib.h unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4506: checking for $ac_hdr" >&5 +echo "configure:4508: 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 4511 "configure" +#line 4513 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4516: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4518: \"$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* @@ -4541,12 +4543,12 @@ done for ac_func in sbrk do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4545: checking for $ac_func" >&5 +echo "configure:4547: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4550 "configure" +#line 4552 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4569,7 +4571,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:4573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4598,12 +4600,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:4602: checking for $ac_hdr that defines DIR" >&5 +echo "configure:4604: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4607 "configure" +#line 4609 "configure" #include "confdefs.h" #include <sys/types.h> #include <$ac_hdr> @@ -4611,7 +4613,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:4615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -4636,7 +4638,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:4640: checking for opendir in -ldir" >&5 +echo "configure:4642: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4644,7 +4646,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <<EOF -#line 4648 "configure" +#line 4650 "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 @@ -4655,7 +4657,7 @@ int main() { opendir() ; return 0; } EOF -if { (eval echo configure:4659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4661: \"$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 @@ -4677,7 +4679,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:4681: checking for opendir in -lx" >&5 +echo "configure:4683: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4685,7 +4687,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <<EOF -#line 4689 "configure" +#line 4691 "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 @@ -4696,7 +4698,7 @@ int main() { opendir() ; return 0; } EOF -if { (eval echo configure:4700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4702: \"$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 @@ -4729,12 +4731,12 @@ EOF esac echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 -echo "configure:4733: checking whether strstr must be declared" >&5 +echo "configure:4735: checking whether strstr must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4738 "configure" +#line 4740 "configure" #include "confdefs.h" #include <stdio.h> @@ -4755,7 +4757,7 @@ int main() { char *(*pfn) = (char *(*)) strstr ; return 0; } EOF -if { (eval echo configure:4759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_strstr=no else @@ -4776,12 +4778,12 @@ EOF fi echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 -echo "configure:4780: checking whether free must be declared" >&5 +echo "configure:4782: checking whether free must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4785 "configure" +#line 4787 "configure" #include "confdefs.h" #include <stdio.h> @@ -4802,7 +4804,7 @@ int main() { char *(*pfn) = (char *(*)) free ; return 0; } EOF -if { (eval echo configure:4806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_free=no else @@ -4823,12 +4825,12 @@ EOF fi echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6 -echo "configure:4827: checking whether sbrk must be declared" >&5 +echo "configure:4829: checking whether sbrk must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_sbrk'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4832 "configure" +#line 4834 "configure" #include "confdefs.h" #include <stdio.h> @@ -4849,7 +4851,7 @@ int main() { char *(*pfn) = (char *(*)) sbrk ; return 0; } EOF -if { (eval echo configure:4853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_sbrk=no else @@ -4870,12 +4872,12 @@ EOF fi echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6 -echo "configure:4874: checking whether getenv must be declared" >&5 +echo "configure:4876: checking whether getenv must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4879 "configure" +#line 4881 "configure" #include "confdefs.h" #include <stdio.h> @@ -4896,7 +4898,7 @@ int main() { char *(*pfn) = (char *(*)) getenv ; return 0; } EOF -if { (eval echo configure:4900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_getenv=no else @@ -4917,12 +4919,12 @@ EOF fi echo $ac_n "checking whether environ must be declared""... $ac_c" 1>&6 -echo "configure:4921: checking whether environ must be declared" >&5 +echo "configure:4923: checking whether environ must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_environ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4926 "configure" +#line 4928 "configure" #include "confdefs.h" #include <stdio.h> @@ -4943,7 +4945,7 @@ int main() { char *(*pfn) = (char *(*)) environ ; return 0; } EOF -if { (eval echo configure:4947: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4949: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_environ=no else @@ -4971,19 +4973,19 @@ fi # constants, while still supporting pre-ANSI compilers which do not # support string concatenation. echo $ac_n "checking whether ANSI C string concatenation works""... $ac_c" 1>&6 -echo "configure:4975: checking whether ANSI C string concatenation works" >&5 +echo "configure:4977: checking whether ANSI C string concatenation works" >&5 if eval "test \"`echo '$''{'ld_cv_string_concatenation'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4980 "configure" +#line 4982 "configure" #include "confdefs.h" int main() { char *a = "a" "a"; ; return 0; } EOF -if { (eval echo configure:4987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ld_cv_string_concatenation=yes else diff --git a/ld/configure.tgt b/ld/configure.tgt index 7b6c572..d0ece5c 100644 --- a/ld/configure.tgt +++ b/ld/configure.tgt @@ -302,6 +302,9 @@ mips*-*-linux-gnu*) targ_emul=elf32btsmip ;; mips*-*-lnews*) targ_emul=mipslnews ;; mips*-*-sysv4*) targ_emul=elf32btsmip ;; +mmix-*-*) targ_emul=mmo + targ_extra_emuls=elf64mmix + ;; mn10200-*-*) targ_emul=mn10200 ;; mn10300-*-*) targ_emul=mn10300 ;; alpha*-*-freebsd*) targ_emul=elf64alpha diff --git a/ld/emulparams/elf64mmix.sh b/ld/emulparams/elf64mmix.sh new file mode 100644 index 0000000..dc4b9e5 --- /dev/null +++ b/ld/emulparams/elf64mmix.sh @@ -0,0 +1,60 @@ +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes +ELFSIZE=64 +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf64-mmix" +ENTRY=_start. + +# Default to 0 as mmixal does. +TEXT_START_ADDR='DEFINED (__.MMIX.start..text) ? __.MMIX.start..text : 0' +# Don't add SIZEOF_HEADERS. +# Don't set EMBEDDED, that would be misleading; it's not that kind of system. +TEXT_BASE_ADDRESS=$TEXT_START_ADDR +DATA_ADDR='DEFINED (__.MMIX.start..data) ? __.MMIX.start..data : 0x2000000000000000' + +# Setting this anywhere near the quite reasonable value of 0x10000 +# causes the binary to bloat to reach page alignment between segments. +# Let's just have a 256-byte default page alignment. Having some +# alignment at all gives a warm feeling but not much more. +MAXPAGESIZE=256 +ARCH=mmix +MACHINE= +COMPILE_IN=yes +EXTRA_EM_FILE=mmixelf + +# The existence of a symbol __start (or _start) should overrule Main, so +# it can be a user symbol without the associated mmixal magic. We +# also want to provide Main as a synonym for _start, if Main wasn't +# defined but is referred to, and _start was defined. +# +# The reason we use a symbol "_start." as a mediator is to avoid +# causing ld to force the type of _start to object rather than no +# type, which confuses disassembly; we also make it alphanumerically +# a successor of _start for similar reasons. Perhaps it's a linker +# bug that linker-defined symbols set the symbol-type. +# +# Note that we smuggle this into OTHER_TEXT_SECTIONS (at the end +# of .text) rather than TEXT_START_SYMBOLS. This is necessary, as +# DEFINED wouldn't find the symbol if it was at the top; presumably +# before the definition, if the definition is not in the first file. +# FIXME: Arguably a linker bug. +OTHER_TEXT_SECTIONS=' + _start. = (DEFINED (_start) ? _start + : (DEFINED (Main) ? Main : (DEFINED (.text) ? .text : 0))); + PROVIDE (Main = DEFINED (Main) ? Main : (DEFINED (_start) ? _start : _start.)); +' + +OTHER_RELOCATING_SECTIONS=' + .MMIX.reg_contents : + { + /* Note that this section always has a fixed VMA - that of its + first register * 8. */ + *(.MMIX.reg_contents); + } +' + +# FIXME: Also bit by the PROVIDE bug? If not, this could be +# EXECUTABLE_SYMBOLS. +# By default, put the high end of the stack where the register stack +# begins. They grow in opposite directions. */ +OTHER_SECTIONS='PROVIDE (__Stack_start = 0x6000000000000000);' diff --git a/ld/emulparams/mmo.sh b/ld/emulparams/mmo.sh new file mode 100644 index 0000000..e0a8798 --- /dev/null +++ b/ld/emulparams/mmo.sh @@ -0,0 +1,10 @@ +SCRIPT_NAME=mmo +TARGET_PAGE_SIZE=256 + +# Default to 0 as mmixal does. +TEXT_START_ADDR='DEFINED (__.MMIX.start..text) ? __.MMIX.start..text : 0' +DATA_ADDR='DEFINED (__.MMIX.start..data) ? __.MMIX.start..data : 0x2000000000000000' +OUTPUT_FORMAT=mmo +ARCH=mmix +COMPILE_IN=yes +EXTRA_EM_FILE=mmo diff --git a/ld/emultempl/mmix-elfnmmo.em b/ld/emultempl/mmix-elfnmmo.em new file mode 100644 index 0000000..d1058b1 --- /dev/null +++ b/ld/emultempl/mmix-elfnmmo.em @@ -0,0 +1,74 @@ +# This shell script emits a C file. -*- C -*- +# Copyright 2001 Free Software Foundation, Inc. +# +# This file is part of GLD, the Gnu Linker. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# + +# This file is sourced from elf32.em and mmo.em, used to define +# MMIX-specific things common to ELF and MMO. + +cat >>e${EMULATION_NAME}.c <<EOF +#include "elf/mmix.h" + +static void mmix_set_reg_section_vma PARAMS ((void)); + +/* We need to set the VMA of the .MMIX.reg_contents section when it has + been allocated. */ + +static void +mmix_set_reg_section_vma () +{ + asection *sec + = bfd_get_section_by_name (output_bfd, MMIX_REG_CONTENTS_SECTION_NAME); + bfd_vma regvma; + + /* If there's no register section, we don't need to do anything. */ + if (sec == NULL) + return; + + regvma = 256 * 8 - sec->_raw_size - 8; + + /* If we start on a local register, we have too many global registers. */ + if (regvma < 32 * 8) + einfo ("%X%P: Too many global registers: %u, max 223\n", + (unsigned) sec->_raw_size / 8); + + /* Set vma to correspond to first such register number * 8. */ + bfd_set_section_vma (output_bfd, sec, regvma); + + /* ??? Why isn't the section size (_cooked_size) set? Doesn't it get + set regardless of presence of relocations? */ + if (sec->_cooked_size == 0 + && ! bfd_set_section_size (output_bfd, sec, sec->_raw_size)) + { + einfo ("%X%P: Can't set section %s size to %u\n", + MMIX_REG_CONTENTS_SECTION_NAME, (unsigned) sec->_raw_size); + return; + } + + /* Simplify symbol output for the register section (without contents; + created for register symbols) by setting the output offset to 0. */ + sec = bfd_get_section_by_name (output_bfd, MMIX_REG_SECTION_NAME); + if (sec == NULL) + return; + + bfd_set_section_vma (abfd, sec, 0); + +} +EOF + +LDEMUL_AFTER_ALLOCATION=mmix_set_reg_section_vma diff --git a/ld/emultempl/mmixelf.em b/ld/emultempl/mmixelf.em new file mode 100644 index 0000000..e84f0b7 --- /dev/null +++ b/ld/emultempl/mmixelf.em @@ -0,0 +1,46 @@ +# This shell script emits a C file. -*- C -*- +# Copyright 2001 Free Software Foundation, Inc. +# +# This file is part of GLD, the Gnu Linker. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# + +# This file is sourced from elf32.em and used to define MMIX and ELF +# specific things. First include what we have in common with mmo. + +. ${srcdir}/emultempl/mmix-elfnmmo.em + +cat >>e${EMULATION_NAME}.c <<EOF +#line 29 "${srcdir}/emultempl/elfmmix.em" + +static void elfmmix_before_parse PARAMS ((void)); + +static void +elfmmix_before_parse () +{ + gld${EMULATION_NAME}_before_parse (); + + /* Make sure we don't create a demand-paged executable. Unfortunately + this isn't changeable with a command-line option. It makes no + difference to mmo, but the sections in elf64mmix will be aligned to a + page in the linked file, which is non-intuitive. If there's ever a + full system with shared libraries and demand paging, you will want to + exclude this file. */ + config.magic_demand_paged = false; +} +EOF + +LDEMUL_BEFORE_PARSE=elfmmix_before_parse diff --git a/ld/emultempl/mmo.em b/ld/emultempl/mmo.em new file mode 100644 index 0000000..eaf0cae --- /dev/null +++ b/ld/emultempl/mmo.em @@ -0,0 +1,228 @@ +# This shell script emits a C file. -*- C -*- +# Copyright 2001 Free Software Foundation, Inc. +# +# This file is part of GLD, the Gnu Linker. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# + +# This file is sourced from elf32.em and mmo.em, used to define +# linker MMIX-specifics common to ELF and MMO. + +. ${srcdir}/emultempl/mmix-elfnmmo.em + +cat >>e${EMULATION_NAME}.c <<EOF + +static boolean mmo_place_orphan + PARAMS ((lang_input_statement_type *, asection *)); +static asection *output_prev_sec_find + PARAMS ((lang_output_section_statement_type *)); +static void mmo_finish PARAMS ((void)); +static void mmo_wipe_sec_reloc_flag PARAMS ((bfd *, asection *, PTR)); + +/* Find the last output section before given output statement. + Used by place_orphan. */ + +static asection * +output_prev_sec_find (os) + lang_output_section_statement_type *os; +{ + asection *s = (asection *) NULL; + lang_statement_union_type *u; + lang_output_section_statement_type *lookup; + + for (u = lang_output_section_statement.head; + u != (lang_statement_union_type *) NULL; + u = lookup->next) + { + lookup = &u->output_section_statement; + if (lookup == os) + break; + if (lookup->bfd_section != NULL + && lookup->bfd_section != bfd_abs_section_ptr + && lookup->bfd_section != bfd_com_section_ptr + && lookup->bfd_section != bfd_und_section_ptr) + s = lookup->bfd_section; + } + + if (u == NULL) + return NULL; + + return s; +} + +struct orphan_save { + lang_output_section_statement_type *os; + asection **section; + lang_statement_union_type **stmt; +}; + +#define HAVE_SECTION(hold, name) \ +(hold.os != NULL || (hold.os = lang_output_section_find (name)) != NULL) + +/* Place an orphan section. We use this to put random SEC_CODE or + SEC_READONLY sections right after MMO_TEXT_SECTION_NAME. Much borrowed + from elf32.em. */ + +static boolean +mmo_place_orphan (file, s) + lang_input_statement_type *file; + asection *s; +{ + static struct orphan_save hold_text; + struct orphan_save *place; + lang_output_section_statement_type *os; + lang_statement_list_type *old; + lang_statement_list_type add; + asection *snew, **pps, *bfd_section; + + /* We have nothing to say for anything other than a final link. */ + if (link_info.relocateable + || (bfd_get_section_flags (s->owner, s) + & (SEC_EXCLUDE | SEC_LOAD)) != SEC_LOAD) + return false; + + /* Only care for sections we're going to load. */ + os = lang_output_section_find (bfd_get_section_name (s->owner, s)); + + /* We have an output section by this name. Place the section inside it + (regardless of whether the linker script lists it as input). */ + if (os != NULL) + { + lang_add_section (&os->children, s, os, file); + return true; + } + + /* If this section does not have .text-type section flags or there's no + MMO_TEXT_SECTION_NAME, we don't have anything to say. */ + if ((bfd_get_section_flags (s->owner, s) & (SEC_CODE | SEC_READONLY)) == 0) + return false; + + if (hold_text.os == NULL) + hold_text.os = lang_output_section_find (MMO_TEXT_SECTION_NAME); + + place = &hold_text; + + /* If there's an output section by this name, we'll use it, regardless + of section flags, in contrast to what's done in elf32.em. */ + + /* Start building a list of statements for this section. + First save the current statement pointer. */ + old = stat_ptr; + + /* Add the output section statements for this orphan to our own private + list, inserting them later into the global statement list. */ + stat_ptr = &add; + lang_list_init (stat_ptr); + + os = lang_enter_output_section_statement (bfd_get_section_name (s->owner, + s), + NULL, 0, + (bfd_vma) 0, + (etree_type *) NULL, + (etree_type *) NULL, + (etree_type *) NULL); + + lang_add_section (&os->children, s, os, file); + + lang_leave_output_section_statement + ((bfd_vma) 0, "*default*", + (struct lang_output_section_phdr_list *) NULL, "*default*"); + + /* Restore the global list pointer. */ + stat_ptr = old; + + snew = os->bfd_section; + bfd_section = place->os->bfd_section; + if (place->section == NULL && bfd_section == NULL) + bfd_section = output_prev_sec_find (place->os); + + if (place->section != NULL + || (bfd_section != NULL + && bfd_section != snew)) + { + /* Shuffle the section to make the output file look neater. This is + really only cosmetic. */ + if (place->section == NULL) + /* Put orphans after the first section on the list. */ + place->section = &bfd_section->next; + + /* Unlink the section. */ + for (pps = &output_bfd->sections; *pps != snew; pps = &(*pps)->next) + ; + *pps = snew->next; + + /* Now tack it on to the "place->os" section list. */ + snew->next = *place->section; + *place->section = snew; + } + place->section = &snew->next; /* Save the end of this list. */ + + if (add.head != NULL) + { + /* We try to put the output statements in some sort of reasonable + order here, because they determine the final load addresses of + the orphan sections. */ + if (place->stmt == NULL) + { + /* Put the new statement list right at the head. */ + *add.tail = place->os->header.next; + place->os->header.next = add.head; + } + else + { + /* Put it after the last orphan statement we added. */ + *add.tail = *place->stmt; + *place->stmt = add.head; + } + + /* Fix the global list pointer if we happened to tack our new list + at the tail. */ + if (*old->tail == add.head) + old->tail = add.tail; + + /* Save the end of this list. */ + place->stmt = add.tail; + } + + return true; +} + +/* Remove the spurious settings of SEC_RELOC that make it to the output at + link time. We are as confused as elflink.h:elf_bfd_final_link, and + paper over the bug similarly. */ + +static void +mmo_wipe_sec_reloc_flag (abfd, sec, ptr) + bfd *abfd; + asection *sec; + PTR ptr ATTRIBUTE_UNUSED; +{ + bfd_set_section_flags (abfd, sec, + bfd_get_section_flags (abfd, sec) & ~SEC_RELOC); +} + +/* Iterate with bfd_map_over_sections over mmo_wipe_sec_reloc_flag... */ + +static void +mmo_finish () +{ + bfd_map_over_sections (output_bfd, mmo_wipe_sec_reloc_flag, NULL); +} + +EOF + +LDEMUL_PLACE_ORPHAN=mmo_place_orphan +LDEMUL_FINISH=mmo_finish diff --git a/ld/gen-doc.texi b/ld/gen-doc.texi index 8d1acad..c0ebac7 100644 --- a/ld/gen-doc.texi +++ b/ld/gen-doc.texi @@ -5,6 +5,7 @@ @c 2. Specific target machines @set H8300 @set I960 +@set MMIX @set TICOFF @c 3. Properties of this configuration diff --git a/ld/ld.texinfo b/ld/ld.texinfo index 9b10cc6..74e0b87 100644 --- a/ld/ld.texinfo +++ b/ld/ld.texinfo @@ -31,6 +31,7 @@ @set M680X0 @set MCORE @set MIPS +@set MMIX @set PDP11 @set PJ @set SH @@ -4263,6 +4264,9 @@ functionality are not listed. * i960:: @code{ld} and the Intel 960 family * ARM:: @code{ld} and the ARM family * HPPA ELF32:: @code{ld} and HPPA 32-bit ELF +@ifset MMIX +* MMIX:: @code{ld} and MMIX +@end ifset @ifset TICOFF * TI COFF:: @code{ld} and TI COFF @end ifset @@ -4438,6 +4442,32 @@ single input section larger than the group size specified will of course create a larger group (of one section). If input sections are too large, it may not be possible for a branch to reach its stub. +@ifset MMIX +@node MMIX +@section @code{ld} and MMIX +For MMIX, there is choice of generating @code{ELF} object files or +@code{mmo} object files when linking. The simulator @code{mmix} +understands the @code{mmo} format. The binutils @code{objcopy} utility +can translate between the two formats. + +There is one special section, the @samp{.MMIX.reg_contents} section. +Contents in this section is assumed to correspond to that of global +registers, and symbols referring to it are translated to special symbols, +equal to registers. In a final link, the start address of the +@samp{.MMIX.reg_contents} section corresponds to the first allocated +global register multiplied by 8. Register @code{$255} is not included in +this section; it is always set to the program entry, which is at the +symbol @code{Main} for @code{mmo} files. + +Symbols with the prefix @code{__.MMIX.start.}, for example +@code{__.MMIX.start..text} and @code{__.MMIX.start..data} are special; +there must be only one each, even if they are local. The default linker +script uses these to set the default start address of a section. + +Initial and trailing multiples of zero-valued 32-bit words in a section, +are left out from an mmo file. +@end ifset + @ifset TICOFF @node TI COFF @section @code{ld}'s support for various TI COFF versions diff --git a/ld/scripttempl/mmo.sc b/ld/scripttempl/mmo.sc new file mode 100644 index 0000000..9155f80 --- /dev/null +++ b/ld/scripttempl/mmo.sc @@ -0,0 +1,129 @@ +cat <<EOF +OUTPUT_FORMAT("mmo") +OUTPUT_ARCH(mmix) +ENTRY(Main) +SECTIONS +{ + .text ${RELOCATING+ ${TEXT_START_ADDR}}: + { + *(.text) + ${RELOCATING+*(.text.*)} + ${RELOCATING+*(.gnu.linkonce.t*)} + ${RELOCATING+*(.rodata)} + ${RELOCATING+*(.rodata.*)} + ${RELOCATING+*(.gnu.linkonce.r*)} + + /* FIXME: Move .init, .fini, .ctors and .dtors to their own sections. */ + ${RELOCATING+ PROVIDE (_init_start = .);} + ${RELOCATING+ PROVIDE (_init = .);} + ${RELOCATING+ *(.init)} + ${RELOCATING+ PROVIDE (_init_end = .);} + + ${RELOCATING+ PROVIDE (_fini_start = .);} + ${RELOCATING+ PROVIDE (_fini = .);} + ${RELOCATING+ *(.fini)} + ${RELOCATING+ PROVIDE (_fini_end = .);} + + /* FIXME: Align ctors, dtors, ehframe. */ + ${RELOCATING+ PROVIDE (_ctors_start = .);} + ${RELOCATING+ PROVIDE (__ctors_start = .);} + ${RELOCATING+ PROVIDE (_ctors = .);} + ${RELOCATING+ PROVIDE (__ctors = .);} + ${RELOCATING+ KEEP (*crtbegin.o(.ctors))} + ${RELOCATING+ KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))} + ${RELOCATING+ KEEP (*(SORT(.ctors.*)))} + ${RELOCATING+ KEEP (*(.ctors))} + ${RELOCATING+ PROVIDE (_ctors_end = .);} + ${RELOCATING+ PROVIDE (__ctors_end = .);} + + ${RELOCATING+ PROVIDE (_dtors_start = .);} + ${RELOCATING+ PROVIDE (__dtors_start = .);} + ${RELOCATING+ PROVIDE (_dtors = .);} + ${RELOCATING+ PROVIDE (__dtors = .);} + ${RELOCATING+ KEEP (*crtbegin.o(.dtors))} + ${RELOCATING+ KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))} + ${RELOCATING+ KEEP (*(SORT(.dtors.*)))} + ${RELOCATING+ KEEP (*(.dtors))} + ${RELOCATING+ PROVIDE (_dtors_end = .);} + ${RELOCATING+ PROVIDE (__dtors_end = .);} + + ${RELOCATING+KEEP (*(.jcr))} + ${RELOCATING+KEEP (*(.eh_frame))} + ${RELOCATING+*(.gcc_except_table)} + + ${RELOCATING+ PROVIDE(etext = .);} + ${RELOCATING+ PROVIDE(_etext = .);} + ${RELOCATING+ PROVIDE(__etext = .);} + } + ${RELOCATING+Main = DEFINED (Main) ? Main : (DEFINED (_start) ? _start : . - SIZEOF (.text));} + + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } + .stab.indexstr 0 : { *(.stab.indexstr) } + .debug_aranges 0 : { *(.debug_aranges) } + .debug_pubnames 0 : { *(.debug_pubnames) } + .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_line 0 : { *(.debug_line) } + .debug_frame 0 : { *(.debug_frame) } + .debug_str 0 : { *(.debug_str) } + .debug_loc 0 : { *(.debug_loc) } + .debug_macinfo 0 : { *(.debug_macinfo) } + + .data ${RELOCATING+ ${DATA_ADDR}}: + { + ${RELOCATING+ PROVIDE(__Sdata = .);} + + *(.data); + ${RELOCATING+*(.data.*)} + ${RELOCATING+*(.gnu.linkonce.d*)} + + ${RELOCATING+ PROVIDE(__Edata = .);} + + /* Deprecated, use __Edata. */ + ${RELOCATING+ PROVIDE(edata = .);} + ${RELOCATING+ PROVIDE(_edata = .);} + ${RELOCATING+ PROVIDE(__edata = .);} + } + + /* At the moment, although perhaps we should, we can't map sections + without contents to sections *with* contents due to FIXME: a BFD bug. + Anyway, the mmo back-end ignores sections without contents when + writing out sections, so this works fine. */ + .bss : + { + ${RELOCATING+ PROVIDE(__Sbss = .);} + ${RELOCATING+ PROVIDE(__bss_start = .);} + ${RELOCATING+ *(.sbss);} + ${RELOCATING+ *(.bss);} + ${RELOCATING+*(.bss.*)} + ${RELOCATING+ *(COMMON);} + ${RELOCATING+ PROVIDE(__Ebss = .);} + } + + /* Deprecated, use __Ebss or __Eall as appropriate. */ + ${RELOCATING+ PROVIDE(end = .);} + ${RELOCATING+ PROVIDE(_end = .);} + ${RELOCATING+ PROVIDE(__end = .);} + ${RELOCATING+ PROVIDE(__Eall = .);} + + .MMIX.reg_contents : + { + /* Note that this section always has a fixed VMA - that of its + first register * 8. */ + *(.MMIX.reg_contents); + } + + /* By default, put the high end of the stack where the register stack + begins. They grow in opposite directions. */ + PROVIDE (__Stack_start = 0x6000000000000000); + + /* Unfortunately, stabs are not mappable from ELF to MMO. + It can probably be fixed with some amount of work. */ + /DISCARD/ : + { *(.gnu.warning.*); } +} +EOF diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index f0d254c..4b760e5 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2001-10-30 Hans-Peter Nilsson <hp@bitrange.com> + + * ld-mmix: New testsuite directory. + 2001-10-14 Hans-Peter Nilsson <hp@bitrange.com> * ld-sh/sub2l-1.d, ld-sh/shared-1.d, ld-sh/weak1.d: Only run on diff --git a/ld/testsuite/ld-mmix/a.s b/ld/testsuite/ld-mmix/a.s new file mode 100644 index 0000000..20e571b --- /dev/null +++ b/ld/testsuite/ld-mmix/a.s @@ -0,0 +1,5 @@ +* The symbol "a" is found here. + .text + .global a +a: + SET $253,4 diff --git a/ld/testsuite/ld-mmix/areg-256.s b/ld/testsuite/ld-mmix/areg-256.s new file mode 100644 index 0000000..21012d8 --- /dev/null +++ b/ld/testsuite/ld-mmix/areg-256.s @@ -0,0 +1,2 @@ + .global areg +areg IS $255+1 diff --git a/ld/testsuite/ld-mmix/areg-t.s b/ld/testsuite/ld-mmix/areg-t.s new file mode 100644 index 0000000..364b01c --- /dev/null +++ b/ld/testsuite/ld-mmix/areg-t.s @@ -0,0 +1,3 @@ + .text + .global areg +areg SWYM 4,8,16 diff --git a/ld/testsuite/ld-mmix/aregm.s b/ld/testsuite/ld-mmix/aregm.s new file mode 100644 index 0000000..2dacbad --- /dev/null +++ b/ld/testsuite/ld-mmix/aregm.s @@ -0,0 +1,5 @@ + .global areg +areg GREG Main+4 + LDOU $3,areg,16 + LDOU $3,$7,areg + LDOU $5,Main+8 diff --git a/ld/testsuite/ld-mmix/b-badfil1.d b/ld/testsuite/ld-mmix/b-badfil1.d new file mode 100644 index 0000000..8a945fb --- /dev/null +++ b/ld/testsuite/ld-mmix/b-badfil1.d @@ -0,0 +1,7 @@ +#source: b-twoinsn.s +#source: b-badfil1.s +#source: b-post1.s +#source: b-goodmain.s +#ld: --oformat binary +#objcopy_linked_file: +#error: invalid mmo file: file number 42 `bar.s', was already entered as `foo.s' diff --git a/ld/testsuite/ld-mmix/b-badfil1.s b/ld/testsuite/ld-mmix/b-badfil1.s new file mode 100644 index 0000000..256fa78 --- /dev/null +++ b/ld/testsuite/ld-mmix/b-badfil1.s @@ -0,0 +1,10 @@ +% The .text contents is supposed to be linked --oformat binary with +% b-twoinsn.s and b-goodmain.s, and will provide two LOP_FILEs, but +% specifying the same file number. + .text + .byte 0x98,06,42,2 + .ascii "foo.s" + .byte 0,0,0 + .byte 0x98,06,42,2 + .ascii "bar.s" + .byte 0,0,0 diff --git a/ld/testsuite/ld-mmix/b-badfil2.d b/ld/testsuite/ld-mmix/b-badfil2.d new file mode 100644 index 0000000..3f98a77 --- /dev/null +++ b/ld/testsuite/ld-mmix/b-badfil2.d @@ -0,0 +1,7 @@ +#source: b-twoinsn.s +#source: b-badfil2.s +#source: b-post1.s +#source: b-goodmain.s +#ld: --oformat binary +#objcopy_linked_file: +#error: invalid mmo file: file name for number 42 was not specified before use diff --git a/ld/testsuite/ld-mmix/b-badfil2.s b/ld/testsuite/ld-mmix/b-badfil2.s new file mode 100644 index 0000000..23d68ba --- /dev/null +++ b/ld/testsuite/ld-mmix/b-badfil2.s @@ -0,0 +1,6 @@ +% The .text contents is supposed to be linked --oformat binary with +% b-twoinsn.s and b-goodmain.s, and will provide a LOP_FILE for file +% number 42, without specifying the file name, which an earlier LOP_FILE +% for the same file number was supposed to have filled in + .text + .byte 0x98,06,42,0 diff --git a/ld/testsuite/ld-mmix/b-badfixo.d b/ld/testsuite/ld-mmix/b-badfixo.d new file mode 100644 index 0000000..3cb6088 --- /dev/null +++ b/ld/testsuite/ld-mmix/b-badfixo.d @@ -0,0 +1,7 @@ +#source: b-twoinsn.s +#source: b-badfixo.s +#source: b-post1.s +#source: b-goodmain.s +#ld: --oformat binary +#objcopy_linked_file: +#error: invalid mmo file: .* lop_fixo diff --git a/ld/testsuite/ld-mmix/b-badfixo.s b/ld/testsuite/ld-mmix/b-badfixo.s new file mode 100644 index 0000000..93cd6d0 --- /dev/null +++ b/ld/testsuite/ld-mmix/b-badfixo.s @@ -0,0 +1,5 @@ +% The .text contents is supposed to be linked --oformat binary with +% b-twoinsn.s and b-goodmain.s, and will provide a LOP_FIXO with invalid; +% (!= 1, != 2), YZ field. + .text + .byte 0x98,3,0,3 diff --git a/ld/testsuite/ld-mmix/b-badloc.d b/ld/testsuite/ld-mmix/b-badloc.d new file mode 100644 index 0000000..dce1ebf --- /dev/null +++ b/ld/testsuite/ld-mmix/b-badloc.d @@ -0,0 +1,7 @@ +#source: b-twoinsn.s +#source: b-badloc.s +#source: b-post1.s +#source: b-goodmain.s +#ld: --oformat binary +#objcopy_linked_file: +#error: invalid mmo file: .* lop_loc diff --git a/ld/testsuite/ld-mmix/b-badloc.s b/ld/testsuite/ld-mmix/b-badloc.s new file mode 100644 index 0000000..098098a --- /dev/null +++ b/ld/testsuite/ld-mmix/b-badloc.s @@ -0,0 +1,5 @@ +% The .text contents is supposed to be linked --oformat binary with +% b-twoinsn.s and b-goodmain.s, and will provide a LOP_LOC with invalid; +% (!= 1, != 2), YZ field. + .text + .byte 0x98,1,0,0 diff --git a/ld/testsuite/ld-mmix/b-badlop.d b/ld/testsuite/ld-mmix/b-badlop.d new file mode 100644 index 0000000..b8c55e5 --- /dev/null +++ b/ld/testsuite/ld-mmix/b-badlop.d @@ -0,0 +1,7 @@ +#source: b-twoinsn.s +#source: b-badlop.s +#source: b-post1.s +#source: b-goodmain.s +#ld: --oformat binary +#objcopy_linked_file: +#error: invalid mmo file: unsupported lopcode diff --git a/ld/testsuite/ld-mmix/b-badlop.s b/ld/testsuite/ld-mmix/b-badlop.s new file mode 100644 index 0000000..9e13332 --- /dev/null +++ b/ld/testsuite/ld-mmix/b-badlop.s @@ -0,0 +1,4 @@ +% The .text contents is supposed to be linked --oformat binary with +% b-twoinsn.s and b-goodmain.s, and will provide an invalid lopcode. + .text + .byte 0x98,0xff,0,0 diff --git a/ld/testsuite/ld-mmix/b-badm.d b/ld/testsuite/ld-mmix/b-badm.d new file mode 100644 index 0000000..39d8ecb --- /dev/null +++ b/ld/testsuite/ld-mmix/b-badm.d @@ -0,0 +1,6 @@ +#source: b-twoinsn.s +#source: b-post1.s +#source: b-badmain.s +#ld: --oformat binary +#objcopy_linked_file: +#error: invalid mmo file: initialization value for .255 is not `Main' diff --git a/ld/testsuite/ld-mmix/b-badm2.s b/ld/testsuite/ld-mmix/b-badm2.s new file mode 100644 index 0000000..eb94278 --- /dev/null +++ b/ld/testsuite/ld-mmix/b-badm2.s @@ -0,0 +1,6 @@ +% The .text contents is supposed to be linked --oformat binary with +% b-twoinsn.s. It will provide an incorrect LOP_END; its YZ field is not +% the number of tetras to the preceding LOP_STAB. + .text + .byte 0x98,0x0b,0x00,0x00,0x20,0x3a,0x30,0x4d,0x20,0x61,0x20,0x69 + .byte 0x01,0x6e,0x04,0x81,0x01,0x61,0x04,0x82,0x98,0x0c,0x00,0x03 diff --git a/ld/testsuite/ld-mmix/b-badmain.s b/ld/testsuite/ld-mmix/b-badmain.s new file mode 100644 index 0000000..4736955 --- /dev/null +++ b/ld/testsuite/ld-mmix/b-badmain.s @@ -0,0 +1,7 @@ +% The .text contents is supposed to be linked --oformat binary with +% b-twoinsn.s, and will provide the end of a mmo file with a value of +% :Main that does not correspond to the address in the initialization of +% $255 - the start address. + .text + .byte 0x98,0x0b,0,0,0x20,0x3a,0x30,0x4d,0x20,0x61,0x20,0x69 + .byte 1,0x6e,0,0x81,1,0x61,4,0x82,0x98,0x0c,0,4 diff --git a/ld/testsuite/ld-mmix/b-badquot.d b/ld/testsuite/ld-mmix/b-badquot.d new file mode 100644 index 0000000..ae3d095 --- /dev/null +++ b/ld/testsuite/ld-mmix/b-badquot.d @@ -0,0 +1,7 @@ +#source: b-twoinsn.s +#source: b-badquot.s +#source: b-post1.s +#source: b-goodmain.s +#ld: --oformat binary +#objcopy_linked_file: +#error: invalid mmo file: .* lop_quote diff --git a/ld/testsuite/ld-mmix/b-badquot.s b/ld/testsuite/ld-mmix/b-badquot.s new file mode 100644 index 0000000..77742db --- /dev/null +++ b/ld/testsuite/ld-mmix/b-badquot.s @@ -0,0 +1,5 @@ +% The .text contents is supposed to be linked --oformat binary with +% b-twoinsn.s and b-goodmain.s, and will provide a LOP_QUOTE with invalid; +% non-zero, YZ field. + .text + .byte 0x98,0,0xff,0 diff --git a/ld/testsuite/ld-mmix/b-badrx1.d b/ld/testsuite/ld-mmix/b-badrx1.d new file mode 100644 index 0000000..1033476 --- /dev/null +++ b/ld/testsuite/ld-mmix/b-badrx1.d @@ -0,0 +1,7 @@ +#source: b-twoinsn.s +#source: b-badrx1.s +#source: b-post1.s +#source: b-goodmain.s +#ld: --oformat binary +#objcopy_linked_file: +#error: invalid mmo file: expected y = 0, .* lop_fixrx diff --git a/ld/testsuite/ld-mmix/b-badrx1.s b/ld/testsuite/ld-mmix/b-badrx1.s new file mode 100644 index 0000000..dd35763 --- /dev/null +++ b/ld/testsuite/ld-mmix/b-badrx1.s @@ -0,0 +1,6 @@ +% The .text contents is supposed to be linked --oformat binary with +% b-twoinsn.s and b-goodmain.s, and will provide a LOP_FIXRX with invalid +% (non-zero), Y field. + .text + .byte 0x98,5,1,0 + .4byte 0 diff --git a/ld/testsuite/ld-mmix/b-badrx2.d b/ld/testsuite/ld-mmix/b-badrx2.d new file mode 100644 index 0000000..6e13019 --- /dev/null +++ b/ld/testsuite/ld-mmix/b-badrx2.d @@ -0,0 +1,7 @@ +#source: b-twoinsn.s +#source: b-badrx2.s +#source: b-post1.s +#source: b-goodmain.s +#ld: --oformat binary +#objcopy_linked_file: +#error: invalid mmo file: expected z .* lop_fixrx diff --git a/ld/testsuite/ld-mmix/b-badrx2.s b/ld/testsuite/ld-mmix/b-badrx2.s new file mode 100644 index 0000000..20def6c --- /dev/null +++ b/ld/testsuite/ld-mmix/b-badrx2.s @@ -0,0 +1,6 @@ +% The .text contents is supposed to be linked --oformat binary with +% b-twoinsn.s and b-goodmain.s, and will provide a LOP_FIXRX with invalid +% (!= 16, != 24), Z field. + .text + .byte 0x98,5,0,8 + .4byte 0 diff --git a/ld/testsuite/ld-mmix/b-badrx3.d b/ld/testsuite/ld-mmix/b-badrx3.d new file mode 100644 index 0000000..c1cffed --- /dev/null +++ b/ld/testsuite/ld-mmix/b-badrx3.d @@ -0,0 +1,7 @@ +#source: b-twoinsn.s +#source: b-badrx3.s +#source: b-post1.s +#source: b-goodmain.s +#ld: --oformat binary +#objcopy_linked_file: +#error: invalid mmo file: leading byte of operand word .* lop_fixrx diff --git a/ld/testsuite/ld-mmix/b-badrx3.s b/ld/testsuite/ld-mmix/b-badrx3.s new file mode 100644 index 0000000..59cd5cb --- /dev/null +++ b/ld/testsuite/ld-mmix/b-badrx3.s @@ -0,0 +1,6 @@ +% The .text contents is supposed to be linked --oformat binary with +% b-twoinsn.s and b-goodmain.s, and will provide a LOP_FIXRX with invalid +% (!= 0, != 1), first byte of the operand word. + .text + .byte 0x98,5,0,24 + .byte 2,0,0,0 diff --git a/ld/testsuite/ld-mmix/b-bend.s b/ld/testsuite/ld-mmix/b-bend.s new file mode 100644 index 0000000..1168ee9 --- /dev/null +++ b/ld/testsuite/ld-mmix/b-bend.s @@ -0,0 +1,6 @@ +% The .text contents is supposed to be linked --oformat binary with +% b-twoinsn.s and b-goodmain.s, and will provide an invalid LOP_END; one +% not at the end of a file. It also does not in YZ specify a correct +% number of bytes between it and a preceding lop_stab. + .text + .byte 0x98,12,0,0 diff --git a/ld/testsuite/ld-mmix/b-bend1.d b/ld/testsuite/ld-mmix/b-bend1.d new file mode 100644 index 0000000..e747753 --- /dev/null +++ b/ld/testsuite/ld-mmix/b-bend1.d @@ -0,0 +1,11 @@ +#source: b-twoinsn.s +#source: b-bend.s +#source: b-post1.s +#source: b-goodmain.s +#ld: --oformat binary +#objcopy_linked_file: +#error: invalid mmo file: lop_end not last item in file + +# This test depend on that the non-at-end condition is tested before +# not-correct-YZ-field and might need tweaking if the implementation +# changes. diff --git a/ld/testsuite/ld-mmix/b-bend2.d b/ld/testsuite/ld-mmix/b-bend2.d new file mode 100644 index 0000000..234b4e5 --- /dev/null +++ b/ld/testsuite/ld-mmix/b-bend2.d @@ -0,0 +1,10 @@ +#source: b-twoinsn.s +#source: b-post1.s +#source: b-goodmain.s +#source: b-bend.s +#ld: --oformat binary +#objcopy_linked_file: +#error: invalid mmo file: lop_end not last item in file + +# We use the b-bend.s file just to make the correct lop_end in +# b-goodmain.s not the last one. diff --git a/ld/testsuite/ld-mmix/b-bend3.d b/ld/testsuite/ld-mmix/b-bend3.d new file mode 100644 index 0000000..3448c22 --- /dev/null +++ b/ld/testsuite/ld-mmix/b-bend3.d @@ -0,0 +1,6 @@ +#source: b-twoinsn.s +#source: b-post1.s +#source: b-badm2.s +#ld: --oformat binary +#objcopy_linked_file: +#error: invalid mmo file: YZ of lop_end .* not equal to the number of tetras to the preceding lop_stab diff --git a/ld/testsuite/ld-mmix/b-bstab1.d b/ld/testsuite/ld-mmix/b-bstab1.d new file mode 100644 index 0000000..6281f06 --- /dev/null +++ b/ld/testsuite/ld-mmix/b-bstab1.d @@ -0,0 +1,7 @@ +#source: b-twoinsn.s +#source: b-bstab1.s +#source: b-post1.s +#source: b-goodmain.s +#ld: --oformat binary +#objcopy_linked_file: +#error: invalid mmo file: fields y and z of lop_stab non-zero, y: 1, z: 2 diff --git a/ld/testsuite/ld-mmix/b-bstab1.s b/ld/testsuite/ld-mmix/b-bstab1.s new file mode 100644 index 0000000..0210106 --- /dev/null +++ b/ld/testsuite/ld-mmix/b-bstab1.s @@ -0,0 +1,5 @@ +% The .text contents is supposed to be linked --oformat binary with +% b-twoinsn.s and b-goodmain.s, and will provide an invalid LOP_STAB, one +% with non-zero y and/or z. + .text + .byte 0x98,11,1,2 diff --git a/ld/testsuite/ld-mmix/b-fixo2.d b/ld/testsuite/ld-mmix/b-fixo2.d new file mode 100644 index 0000000..62eb013 --- /dev/null +++ b/ld/testsuite/ld-mmix/b-fixo2.d @@ -0,0 +1,28 @@ +#source: b-twoinsn.s +#source: b-fixo2.s +#source: b-post1.s +#source: b-goodmain.s +#ld: --oformat binary +#objcopy_linked_file: +#objdump: -sht + +# Note that we "optimize" out the high tetrabyte of 0 written to +# 2068098510aa5560, hence only the low part is left. + +.*: file format mmo + +Sections: +Idx Name Size VMA LMA File off Algn + 0 \.text 0+8 0+ 0+ 0+ 2\*\*2 + CONTENTS, ALLOC, LOAD, CODE + 1 \.data 0+4 2068098510aa5564 2068098510aa5564 0+ 2\*\*2 + CONTENTS, ALLOC, LOAD +SYMBOL TABLE: +0+4 g \.text Main +0+4 g \.text a + + +Contents of section \.text: + 0000 e3fd0001 e3fd0004 .* +Contents of section \.data: + 10aa5564 00000008 .* diff --git a/ld/testsuite/ld-mmix/b-fixo2.s b/ld/testsuite/ld-mmix/b-fixo2.s new file mode 100644 index 0000000..f892999 --- /dev/null +++ b/ld/testsuite/ld-mmix/b-fixo2.s @@ -0,0 +1,6 @@ +% The .text contents is supposed to be linked --oformat binary with +% b-twoinsn.s and b-goodmain.s, and will provide a LOP_FIXO storing the +% current address at address 0x2068098510aa5560. + .text + .byte 0x98,3,0x20,2 + .8byte 0x68098510aa5560 diff --git a/ld/testsuite/ld-mmix/b-goodmain.s b/ld/testsuite/ld-mmix/b-goodmain.s new file mode 100644 index 0000000..c90063e --- /dev/null +++ b/ld/testsuite/ld-mmix/b-goodmain.s @@ -0,0 +1,5 @@ +% The .text contents is supposed to be linked --oformat binary with +% b-twoinsn.s, and will provide a valid end of a mmo file. + .text + .byte 0x98,0x0b,0x00,0x00,0x20,0x3a,0x30,0x4d,0x20,0x61,0x20,0x69 + .byte 0x01,0x6e,0x04,0x81,0x01,0x61,0x04,0x82,0x98,0x0c,0x00,0x04 diff --git a/ld/testsuite/ld-mmix/b-loc64k.d b/ld/testsuite/ld-mmix/b-loc64k.d new file mode 100644 index 0000000..bb384e4 --- /dev/null +++ b/ld/testsuite/ld-mmix/b-loc64k.d @@ -0,0 +1,25 @@ +#source: b-loc64k.s +#source: b-goodmain.s +#ld: --oformat binary +#objcopy_linked_file: +#objdump: -dht + +.*: file format mmo + +Sections: +Idx Name Size VMA LMA File off Algn + 0 \.text 0+10004 0+ 0+ 0+ 2\*\*2 + CONTENTS, ALLOC, LOAD, CODE +SYMBOL TABLE: +0+4 g \.text Main +0+4 g \.text a + + +Disassembly of section \.text: + +0+ <Main-0x4>: + 0: e3fd0001 setl \$253,0x1 + +0+4 <Main>: + \.\.\. + 10000: e3fd0004 setl \$253,0x4 diff --git a/ld/testsuite/ld-mmix/b-loc64k.s b/ld/testsuite/ld-mmix/b-loc64k.s new file mode 100644 index 0000000..ea563d2 --- /dev/null +++ b/ld/testsuite/ld-mmix/b-loc64k.s @@ -0,0 +1,8 @@ +% The .text contents is supposed to be linked --oformat binary, and will +% correspond to the start of a mmo file with two instructions, 64k apart. +% This file ends before the LOP_STAB. + .text + .byte 0x98,9,1,1,0x3b,0x7f,0x9c,0xe3,0x98,1,0,2,0,0,0,0 + .byte 0,0,0,0,0xe3,0xfd,0,1,0x98,1,0,2,0,0,0,0 + .byte 0,1,0,0,0xe3,0xfd,0,4,0x98,0x0a,0,0xff,0,0,0,0 + .byte 0,0,0,4 diff --git a/ld/testsuite/ld-mmix/b-nosym.d b/ld/testsuite/ld-mmix/b-nosym.d new file mode 100644 index 0000000..06594a1 --- /dev/null +++ b/ld/testsuite/ld-mmix/b-nosym.d @@ -0,0 +1,15 @@ +#source: b-twoinsn.s +#source: b-post1.s +#source: b-nosym.s +#ld: --oformat binary +#objcopy_linked_file: +#objdump: -st + +.*: file format mmo + +SYMBOL TABLE: +0+4 g \.text Main + + +Contents of section \.text: + 0000 e3fd0001 e3fd0004 .* diff --git a/ld/testsuite/ld-mmix/b-nosym.s b/ld/testsuite/ld-mmix/b-nosym.s new file mode 100644 index 0000000..5b77f1d --- /dev/null +++ b/ld/testsuite/ld-mmix/b-nosym.s @@ -0,0 +1,6 @@ +% The .text contents is supposed to be linked --oformat binary with +% b-twoinsn.s, and will provide a valid end of a mmo file but with no +% symbols (if that is actually valid). + .text + .byte 0x98,0x0b,0x00,0x00,0x98,0x0c,0x00,0x00 + diff --git a/ld/testsuite/ld-mmix/b-post1.s b/ld/testsuite/ld-mmix/b-post1.s new file mode 100644 index 0000000..a60aece --- /dev/null +++ b/ld/testsuite/ld-mmix/b-post1.s @@ -0,0 +1,5 @@ +% The .text contents is supposed to be linked --oformat binary, and will +% correspond to a LOP_POST for an initialization of $255 with 4. A +% LOP_STAB, such as in b-goodmain.s should follow. + .text + .byte 0x98,0x0a,0,0xff,0,0,0,0,0,0,0,4 diff --git a/ld/testsuite/ld-mmix/b-twoinsn.s b/ld/testsuite/ld-mmix/b-twoinsn.s new file mode 100644 index 0000000..d9e0147 --- /dev/null +++ b/ld/testsuite/ld-mmix/b-twoinsn.s @@ -0,0 +1,7 @@ +% The .text contents is supposed to be linked --oformat binary, and will +% correspond to the start of a mmo file with two instructions. This file +% ends before the LOP_STAB. + .text + .byte 0x98,9,1,1,0x3b,0x7f,0x9c,0xe3,0x98,1,0,2,0,0,0,0 + .byte 0,0,0,0,0xe3,0xfd,0,1,0x98,1,0,2,0,0,0,0 + .byte 0,0,0,4,0xe3,0xfd,0,4 diff --git a/ld/testsuite/ld-mmix/b-widec.s b/ld/testsuite/ld-mmix/b-widec.s new file mode 100644 index 0000000..c6f8c30 --- /dev/null +++ b/ld/testsuite/ld-mmix/b-widec.s @@ -0,0 +1,7 @@ +% The .text contents is supposed to be linked --oformat binary with +% b-twoinsn.s, and will provide a valid end of a mmo file, but with the +% "n" in :Main in wide character format; the widening is with a nil, so it +% is treated like a normal "n". + .text + .byte 0x98,0x0b,0x00,0x00,0x20,0x3a,0x30,0x4d,0x20,0x61,0x20,0x69 + .byte 0x81,0,0x6e,0x04,0x81,0x01,0x61,0x04,0x82,0,0,0,0x98,0x0c,0x00,0x05 diff --git a/ld/testsuite/ld-mmix/b-widec1.d b/ld/testsuite/ld-mmix/b-widec1.d new file mode 100644 index 0000000..e290ba1 --- /dev/null +++ b/ld/testsuite/ld-mmix/b-widec1.d @@ -0,0 +1,12 @@ +#source: b-twoinsn.s +#source: b-post1.s +#source: b-widec.s +#ld: --oformat binary +#objcopy_linked_file: +#objdump: -t + +.*: file format mmo + +SYMBOL TABLE: +0+4 g \.text Main +0+4 g \.text a diff --git a/ld/testsuite/ld-mmix/b-widec2.d b/ld/testsuite/ld-mmix/b-widec2.d new file mode 100644 index 0000000..4094b59 --- /dev/null +++ b/ld/testsuite/ld-mmix/b-widec2.d @@ -0,0 +1,6 @@ +#source: b-twoinsn.s +#source: b-post1.s +#source: b-widec2.s +#ld: --oformat binary +#objcopy_linked_file: +#error: unsupported wide character sequence 0xFF 0x6E diff --git a/ld/testsuite/ld-mmix/b-widec2.s b/ld/testsuite/ld-mmix/b-widec2.s new file mode 100644 index 0000000..7745365 --- /dev/null +++ b/ld/testsuite/ld-mmix/b-widec2.s @@ -0,0 +1,7 @@ +% The .text contents is supposed to be linked --oformat binary with +% b-twoinsn.s, and will provide a valid end of a mmo file, but with the +% "n" in :Main in wide character format; the widening is with a 0xff, so it +% isn't supported, and the file is rejected. + .text + .byte 0x98,0x0b,0x00,0x00,0x20,0x3a,0x30,0x4d,0x20,0x61,0x20,0x69 + .byte 0x81,0xff,0x6e,0x04,0x81,0x01,0x61,0x04,0x82,0,0,0,0x98,0x0c,0x00,0x05 diff --git a/ld/testsuite/ld-mmix/b-widec3.d b/ld/testsuite/ld-mmix/b-widec3.d new file mode 100644 index 0000000..f4cb3b9 --- /dev/null +++ b/ld/testsuite/ld-mmix/b-widec3.d @@ -0,0 +1,6 @@ +#source: b-twoinsn.s +#source: b-post1.s +#source: b-widec3.s +#ld: --oformat binary +#objcopy_linked_file: +#error: invalid symbol table: duplicate symbol `Main' diff --git a/ld/testsuite/ld-mmix/b-widec3.s b/ld/testsuite/ld-mmix/b-widec3.s new file mode 100644 index 0000000..96abcd8 --- /dev/null +++ b/ld/testsuite/ld-mmix/b-widec3.s @@ -0,0 +1,9 @@ +% The .text contents is supposed to be linked --oformat binary with +% b-twoinsn.s, and will provide a valid end of a mmo file, but with the +% "n" in :Main in wide character format; the widening is with a nil, so it +% is treated like a normal "n". Also, it provides a normal "n", so the +% two symbols collide. + .text + .byte 0x98,0x0b,0x00,0x00,0x20,0x3a,0x30,0x4d,0x20,0x61,0x20,0x69 + .byte 0x91,0,0x6e,0x04,0x81,0x01,0x6e,0x04,0x83,1,0x01,0x61,0x04,0x82,0,0,0x98,0x0c,0,0x06 + diff --git a/ld/testsuite/ld-mmix/bspec1.d b/ld/testsuite/ld-mmix/bspec1.d new file mode 100644 index 0000000..2d6a623 --- /dev/null +++ b/ld/testsuite/ld-mmix/bspec1.d @@ -0,0 +1,58 @@ +#source: bspec1.s +#source: start.s +#ld: -m elf64mmix +#readelf: -Ssr -x1 -x5 + +There are 9 section headers, starting at offset 0x100: + +Section Headers: + \[Nr\] Name Type Address Offset + Size EntSize Flags Link Info Align + \[ 0\] NULL 0+ 0+ + 0+ 0+ 0 0 0 + \[ 1\] \.text PROGBITS 0+ 0+b0 + 0+4 0+ AX 0 0 4 + \[ 2\] \.data PROGBITS 2000000000000000 0+b4 + 0+ 0+ WA 0 0 1 + \[ 3\] \.sbss PROGBITS 2000000000000000 0+b4 + 0+ 0+ W 0 0 1 + \[ 4\] \.bss NOBITS 2000000000000000 0+b4 + 0+ 0+ WA 0 0 1 + \[ 5\] \.MMIX\.spec_data\.2 PROGBITS 0+ 0+b4 + 0+4 0+ 0 0 4 + \[ 6\] \.shstrtab STRTAB 0+ 0+b8 + 0+44 0+ 0 0 1 + \[ 7\] \.symtab SYMTAB 0+ 0+340 + 0+168 0+18 8 9 8 + \[ 8\] \.strtab STRTAB 0+ 0+4a8 + 0+2d 0+ 0 0 1 +Key to Flags: + W \(write\), A \(alloc\), X \(execute\), M \(merge\), S \(strings\) + I \(info\), L \(link order\), G \(group\), x \(unknown\) + O \(extra OS processing required\) o \(OS specific\), p \(processor specific\) + +There are no relocations in this file\. + +Symbol table '\.symtab' contains 15 entries: + Num: Value Size Type Bind Vis Ndx Name + 0: 0+ 0 NOTYPE LOCAL DEFAULT UND + 1: 0+ 0 SECTION LOCAL DEFAULT 1 + 2: 2000000000000000 0 SECTION LOCAL DEFAULT 2 + 3: 2000000000000000 0 SECTION LOCAL DEFAULT 3 + 4: 2000000000000000 0 SECTION LOCAL DEFAULT 4 + 5: 0+ 0 SECTION LOCAL DEFAULT 5 + 6: 0+ 0 SECTION LOCAL DEFAULT 6 + 7: 0+ 0 SECTION LOCAL DEFAULT 7 + 8: 0+ 0 SECTION LOCAL DEFAULT 8 + 9: 0+ 0 FUNC GLOBAL DEFAULT 1 Main + 10: 0+ 0 NOTYPE GLOBAL DEFAULT 1 _start + 11: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS __bss_start + 12: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS _edata + 13: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS _end + 14: 0+ 0 OBJECT GLOBAL DEFAULT 1 _start\. + +Hex dump of section '\.text': + 0x0+ e3fd0001 .* + +Hex dump of section '\.MMIX\.spec_data\.2': + 0x0+ 0000002a .* diff --git a/ld/testsuite/ld-mmix/bspec1.s b/ld/testsuite/ld-mmix/bspec1.s new file mode 100644 index 0000000..0c1707f --- /dev/null +++ b/ld/testsuite/ld-mmix/bspec1.s @@ -0,0 +1,3 @@ + BSPEC 2 + TETRA :Main+42 + ESPEC diff --git a/ld/testsuite/ld-mmix/bspec1m.d b/ld/testsuite/ld-mmix/bspec1m.d new file mode 100644 index 0000000..658bb80 --- /dev/null +++ b/ld/testsuite/ld-mmix/bspec1m.d @@ -0,0 +1,16 @@ +#source: bspec1.s +#source: start.s +#ld: -m mmo +#objdump: -str + +.*: file format mmo + +SYMBOL TABLE: +0+ g \.text Main +0+ g \.text _start + + +Contents of section \.text: + 0+ e3fd0001 .* +Contents of section \.MMIX\.spec_data\.2: + 0000 0000002a .* diff --git a/ld/testsuite/ld-mmix/bspec2.d b/ld/testsuite/ld-mmix/bspec2.d new file mode 100644 index 0000000..05aa113 --- /dev/null +++ b/ld/testsuite/ld-mmix/bspec2.d @@ -0,0 +1,68 @@ +#source: bspec1.s +#source: bspec2.s +#source: bspec1.s +#source: start.s +#source: ext1.s +#ld: -m elf64mmix +#readelf: -Ssr -x1 -x5 -x6 + +There are 10 section headers, starting at offset 0x118: + +Section Headers: + \[Nr\] Name Type Address Offset + Size EntSize Flags Link Info Align + \[ 0\] NULL 0+ 0+ + 0+ 0+ 0 0 0 + \[ 1\] \.text PROGBITS 0+ 0+b0 + 0+4 0+ AX 0 0 4 + \[ 2\] \.data PROGBITS 2000000000000000 0+b4 + 0+ 0+ WA 0 0 1 + \[ 3\] \.sbss PROGBITS 2000000000000000 0+b4 + 0+ 0+ W 0 0 1 + \[ 4\] \.bss NOBITS 2000000000000000 0+b4 + 0+ 0+ WA 0 0 1 + \[ 5\] \.MMIX\.spec_data\.2 PROGBITS 0+ 0+b4 + 0+8 0+ 0 0 4 + \[ 6\] \.MMIX\.spec_data\.3 PROGBITS 0+ 0+bc + 0+4 0+ 0 0 4 + \[ 7\] \.shstrtab STRTAB 0+ 0+c0 + 0+56 0+ 0 0 1 + \[ 8\] \.symtab SYMTAB 0+ 0+398 + 0+198 0+18 9 a 8 + \[ 9\] \.strtab STRTAB 0+ 0+530 + 0+32 0+ 0 0 1 +Key to Flags: + W \(write\), A \(alloc\), X \(execute\), M \(merge\), S \(strings\) + I \(info\), L \(link order\), G \(group\), x \(unknown\) + O \(extra OS processing required\) o \(OS specific\), p \(processor specific\) + +There are no relocations in this file\. + +Symbol table '\.symtab' contains 17 entries: + Num: Value Size Type Bind Vis Ndx Name + 0: 0+ 0 NOTYPE LOCAL DEFAULT UND + 1: 0+ 0 SECTION LOCAL DEFAULT 1 + 2: 2000000000000000 0 SECTION LOCAL DEFAULT 2 + 3: 2000000000000000 0 SECTION LOCAL DEFAULT 3 + 4: 2000000000000000 0 SECTION LOCAL DEFAULT 4 + 5: 0+ 0 SECTION LOCAL DEFAULT 5 + 6: 0+ 0 SECTION LOCAL DEFAULT 6 + 7: 0+ 0 SECTION LOCAL DEFAULT 7 + 8: 0+ 0 SECTION LOCAL DEFAULT 8 + 9: 0+ 0 SECTION LOCAL DEFAULT 9 + 10: 0+ 0 FUNC GLOBAL DEFAULT 1 Main + 11: 0+fc 0 NOTYPE GLOBAL DEFAULT ABS ext1 + 12: 0+ 0 NOTYPE GLOBAL DEFAULT 1 _start + 13: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS __bss_start + 14: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS _edata + 15: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS _end + 16: 0+ 0 OBJECT GLOBAL DEFAULT 1 _start\. + +Hex dump of section '\.text': + 0x0+ e3fd0001 .* + +Hex dump of section '\.MMIX\.spec_data\.2': + 0x0+ 0000002a 0000002a .* + +Hex dump of section '\.MMIX\.spec_data\.3': + 0x0+ 000000fc .* diff --git a/ld/testsuite/ld-mmix/bspec2.s b/ld/testsuite/ld-mmix/bspec2.s new file mode 100644 index 0000000..f939d77 --- /dev/null +++ b/ld/testsuite/ld-mmix/bspec2.s @@ -0,0 +1,3 @@ + BSPEC 3 + TETRA ext1 + ESPEC diff --git a/ld/testsuite/ld-mmix/bspec2m.d b/ld/testsuite/ld-mmix/bspec2m.d new file mode 100644 index 0000000..1ee659e --- /dev/null +++ b/ld/testsuite/ld-mmix/bspec2m.d @@ -0,0 +1,22 @@ +#source: bspec1.s +#source: bspec2.s +#source: bspec1.s +#source: start.s +#source: ext1.s +#ld: -m mmo +#objdump: -str + +.*: file format mmo + +SYMBOL TABLE: +0+ g \.text Main +0+fc g \*ABS\* ext1 +0+ g \.text _start + + +Contents of section \.text: + 0+ e3fd0001 .* +Contents of section \.MMIX\.spec_data\.2: + 0000 0000002a 0000002a .* +Contents of section \.MMIX\.spec_data\.3: + 0000 000000fc .* diff --git a/ld/testsuite/ld-mmix/bspec801.s b/ld/testsuite/ld-mmix/bspec801.s new file mode 100644 index 0000000..9c62909 --- /dev/null +++ b/ld/testsuite/ld-mmix/bspec801.s @@ -0,0 +1,3 @@ + BSPEC 80 + TETRA 0x98000001 + ESPEC diff --git a/ld/testsuite/ld-mmix/bspec802.s b/ld/testsuite/ld-mmix/bspec802.s new file mode 100644 index 0000000..13cbec4 --- /dev/null +++ b/ld/testsuite/ld-mmix/bspec802.s @@ -0,0 +1,7 @@ + BSPEC 80 + TETRA 4 % Decent section length name (in 32-bit words). However... + ESPEC % Everything ends here. The next thing is a LOP_LOC for .data, or + % an ending LOP-something, hence a non-LOP_QUOTE in the name. + + .data + TETRA 0x112233 diff --git a/ld/testsuite/ld-mmix/bspec803.s b/ld/testsuite/ld-mmix/bspec803.s new file mode 100644 index 0000000..64b5e3b --- /dev/null +++ b/ld/testsuite/ld-mmix/bspec803.s @@ -0,0 +1,9 @@ + BSPEC 80 + TETRA 2 % Decent section length name (in 32-bit words). However... + BYTE "aaaa" + BYTE 0x98,"aaa" # A LOP_QUOTEd part here. And also... + ESPEC % Everything ends here. The next thing is a LOP_LOC for .data, or + % an ending LOP-something, hence a non-LOP_QUOTE in the section flags. + + .data + TETRA 0x112233 diff --git a/ld/testsuite/ld-mmix/bspec804.s b/ld/testsuite/ld-mmix/bspec804.s new file mode 100644 index 0000000..2c64c0a --- /dev/null +++ b/ld/testsuite/ld-mmix/bspec804.s @@ -0,0 +1,9 @@ + BSPEC 80 + TETRA 2 % Decent section length name (in 32-bit words). + BYTE "aaaaaaaa" + TETRA 0x11 % Flags. However... + ESPEC % Everything ends here. The next thing is a LOP_LOC for .data, or + % an ending LOP-something, hence a non-LOP_QUOTE in the section + % length, high part. + .data + TETRA 0x112233 diff --git a/ld/testsuite/ld-mmix/bspec805.s b/ld/testsuite/ld-mmix/bspec805.s new file mode 100644 index 0000000..a5c09e3 --- /dev/null +++ b/ld/testsuite/ld-mmix/bspec805.s @@ -0,0 +1,10 @@ + BSPEC 80 + TETRA 2 % Decent section length name (in 32-bit words). + BYTE "aaaaaaaa" + TETRA 0x11 % Flags. + TETRA 0 % Decent high-part of section length. However... + ESPEC % Everything ends here. The next thing is a LOP_LOC for .data, or + % an ending LOP-something, hence a non-LOP_QUOTE in the section + % length, high part. + .data + TETRA 0x112233 diff --git a/ld/testsuite/ld-mmix/bspec806.s b/ld/testsuite/ld-mmix/bspec806.s new file mode 100644 index 0000000..8f6c75f --- /dev/null +++ b/ld/testsuite/ld-mmix/bspec806.s @@ -0,0 +1,10 @@ + BSPEC 80 + TETRA 2 % Decent section length name (in 32-bit words). + BYTE "aaaaaaaa" + TETRA 0x11 % Flags. + OCTA 12 % Decent section length. However... + ESPEC % Everything ends here. The next thing is a LOP_LOC for .data, or + % an ending LOP-something, hence a non-LOP_QUOTE in the section + % length, high part. + .data + TETRA 0x112233 diff --git a/ld/testsuite/ld-mmix/bspec807.s b/ld/testsuite/ld-mmix/bspec807.s new file mode 100644 index 0000000..3c16c12 --- /dev/null +++ b/ld/testsuite/ld-mmix/bspec807.s @@ -0,0 +1,9 @@ + BSPEC 80 + TETRA 2 % Decent section length name (in 32-bit words). + BYTE "aaaaaaaa" + TETRA 0x11 % Flags. + TETRA 0,12 % Decent section length. However... + TETRA 0 % Things end stops after the high part of the VMA. + ESPEC + .data + TETRA 0x112233 diff --git a/ld/testsuite/ld-mmix/bspec808.s b/ld/testsuite/ld-mmix/bspec808.s new file mode 100644 index 0000000..b8fc495 --- /dev/null +++ b/ld/testsuite/ld-mmix/bspec808.s @@ -0,0 +1,9 @@ + BSPEC 80 + TETRA 2 % Decent section length name (in 32-bit words). + BYTE "aaaaaaaa" + TETRA 0x11 % Flags. + TETRA 0xff00,0 % Indecent section length + TETRA 0xff,0 % Decent vma. + ESPEC + .data + TETRA 0x112233 diff --git a/ld/testsuite/ld-mmix/bza-1b.d b/ld/testsuite/ld-mmix/bza-1b.d new file mode 100644 index 0000000..dcd0313 --- /dev/null +++ b/ld/testsuite/ld-mmix/bza-1b.d @@ -0,0 +1,26 @@ +#source: start.s +#source: a.s +#source: bza.s +#as: -x +#ld: -m elf64mmix +#objdump: -dr + +.*: file format elf64-mmix + +Disassembly of section \.text: + +0+ <_start>: + 0+: e3fd0001 setl \$253,0x1 + +0+4 <a>: + 4: e3fd0004 setl \$253,0x4 + +0+8 <bza>: + 8: e3fd0002 setl \$253,0x2 + c: 5aea0006 pbnz \$234,24 <bza\+0x1c> + 10: e3ff0004 setl \$255,0x4 + 14: e6ff0000 incml \$255,0x0 + 18: e5ff0000 incmh \$255,0x0 + 1c: e4ff0000 inch \$255,0x0 + 20: 9fffff00 go \$255,\$255,0 + 24: e3fd0003 setl \$253,0x3 diff --git a/ld/testsuite/ld-mmix/bza-1f.d b/ld/testsuite/ld-mmix/bza-1f.d new file mode 100644 index 0000000..bc4006f --- /dev/null +++ b/ld/testsuite/ld-mmix/bza-1f.d @@ -0,0 +1,26 @@ +#source: start.s +#source: bza.s +#source: a.s +#as: -x +#ld: -m elf64mmix +#objdump: -dr + +.*: file format elf64-mmix + +Disassembly of section \.text: + +0+ <_start>: + 0+: e3fd0001 setl \$253,0x1 + +0+4 <bza>: + 4: e3fd0002 setl \$253,0x2 + 8: 5aea0006 pbnz \$234,20 <bza\+0x1c> + c: e3ff0024 setl \$255,0x24 + 10: e6ff0000 incml \$255,0x0 + 14: e5ff0000 incmh \$255,0x0 + 18: e4ff0000 inch \$255,0x0 + 1c: 9fffff00 go \$255,\$255,0 + 20: e3fd0003 setl \$253,0x3 + +0+24 <a>: + 24: e3fd0004 setl \$253,0x4 diff --git a/ld/testsuite/ld-mmix/bza-2b.d b/ld/testsuite/ld-mmix/bza-2b.d new file mode 100644 index 0000000..a5d9b28 --- /dev/null +++ b/ld/testsuite/ld-mmix/bza-2b.d @@ -0,0 +1,21 @@ +#source: start.s +#source: a.s +#source: bza.s +#as: -no-expand +#ld: -m elf64mmix +#objdump: -dr + +.*: file format elf64-mmix + +Disassembly of section \.text: + +0+ <_start>: + 0+: e3fd0001 setl \$253,0x1 + +0+4 <a>: + 4: e3fd0004 setl \$253,0x4 + +0+8 <bza>: + 8: e3fd0002 setl \$253,0x2 + c: 43eafffe bz \$234,4 <a> + 10: e3fd0003 setl \$253,0x3 diff --git a/ld/testsuite/ld-mmix/bza-2f.d b/ld/testsuite/ld-mmix/bza-2f.d new file mode 100644 index 0000000..21a6ca9 --- /dev/null +++ b/ld/testsuite/ld-mmix/bza-2f.d @@ -0,0 +1,21 @@ +#source: start.s +#source: bza.s +#source: a.s +#as: -no-expand +#ld: -m elf64mmix +#objdump: -dr + +.*: file format elf64-mmix + +Disassembly of section \.text: + +0+ <_start>: + 0: e3fd0001 setl \$253,0x1 + +0+4 <bza>: + 4: e3fd0002 setl \$253,0x2 + 8: 42ea0002 bz \$234,10 <a> + c: e3fd0003 setl \$253,0x3 + +0+10 <a>: + 10: e3fd0004 setl \$253,0x4 diff --git a/ld/testsuite/ld-mmix/bza-7b.d b/ld/testsuite/ld-mmix/bza-7b.d new file mode 100644 index 0000000..ab98ad3 --- /dev/null +++ b/ld/testsuite/ld-mmix/bza-7b.d @@ -0,0 +1,26 @@ +#source: start.s +#source: a.s +#source: bza.s +#as: -x +#ld: -m mmo +#objdump: -dr + +.*: file format mmo + +Disassembly of section \.text: + +0+ <(Main|_start)>: + 0+: e3fd0001 setl \$253,0x1 + +0+4 <a>: + 4: e3fd0004 setl \$253,0x4 + +0+8 <bza>: + 8: e3fd0002 setl \$253,0x2 + c: 5aea0006 pbnz \$234,24 <bza\+0x1c> + 10: e3ff0004 setl \$255,0x4 + 14: e6ff0000 incml \$255,0x0 + 18: e5ff0000 incmh \$255,0x0 + 1c: e4ff0000 inch \$255,0x0 + 20: 9fffff00 go \$255,\$255,0 + 24: e3fd0003 setl \$253,0x3 diff --git a/ld/testsuite/ld-mmix/bza-7f.d b/ld/testsuite/ld-mmix/bza-7f.d new file mode 100644 index 0000000..be2ea56 --- /dev/null +++ b/ld/testsuite/ld-mmix/bza-7f.d @@ -0,0 +1,26 @@ +#source: start.s +#source: bza.s +#source: a.s +#as: -x +#ld: -m mmo +#objdump: -dr + +.*: file format mmo + +Disassembly of section \.text: + +0+ <(Main|_start)>: + 0+: e3fd0001 setl \$253,0x1 + +0+4 <bza>: + 4: e3fd0002 setl \$253,0x2 + 8: 5aea0006 pbnz \$234,20 <bza\+0x1c> + c: e3ff0024 setl \$255,0x24 + 10: e6ff0000 incml \$255,0x0 + 14: e5ff0000 incmh \$255,0x0 + 18: e4ff0000 inch \$255,0x0 + 1c: 9fffff00 go \$255,\$255,0 + 20: e3fd0003 setl \$253,0x3 + +0+24 <a>: + 24: e3fd0004 setl \$253,0x4 diff --git a/ld/testsuite/ld-mmix/bza-8b.d b/ld/testsuite/ld-mmix/bza-8b.d new file mode 100644 index 0000000..b0eef74 --- /dev/null +++ b/ld/testsuite/ld-mmix/bza-8b.d @@ -0,0 +1,21 @@ +#source: start.s +#source: a.s +#source: bza.s +#as: -no-expand +#ld: -m mmo +#objdump: -dr + +.*: file format mmo + +Disassembly of section \.text: + +0+ <(Main|_start)>: + 0+: e3fd0001 setl \$253,0x1 + +0+4 <a>: + 4: e3fd0004 setl \$253,0x4 + +0+8 <bza>: + 8: e3fd0002 setl \$253,0x2 + c: 43eafffe bz \$234,4 <a> + 10: e3fd0003 setl \$253,0x3 diff --git a/ld/testsuite/ld-mmix/bza-8f.d b/ld/testsuite/ld-mmix/bza-8f.d new file mode 100644 index 0000000..2d2a521 --- /dev/null +++ b/ld/testsuite/ld-mmix/bza-8f.d @@ -0,0 +1,21 @@ +#source: start.s +#source: bza.s +#source: a.s +#as: -no-expand +#ld: -m mmo +#objdump: -dr + +.*: file format mmo + +Disassembly of section \.text: + +0+ <(Main|_start)>: + 0+: e3fd0001 setl \$253,0x1 + +0+4 <bza>: + 4: e3fd0002 setl \$253,0x2 + 8: 42ea0002 bz \$234,10 <a> + c: e3fd0003 setl \$253,0x3 + +0+10 <a>: + 10: e3fd0004 setl \$253,0x4 diff --git a/ld/testsuite/ld-mmix/bza.s b/ld/testsuite/ld-mmix/bza.s new file mode 100644 index 0000000..4cf848d --- /dev/null +++ b/ld/testsuite/ld-mmix/bza.s @@ -0,0 +1,7 @@ +* Just BEQs to an external symbol, with some padding. + .text + .global bza +bza: + SET $253,2 + BZ $234,a + SET $253,3 diff --git a/ld/testsuite/ld-mmix/data1.s b/ld/testsuite/ld-mmix/data1.s new file mode 100644 index 0000000..0f4baf9 --- /dev/null +++ b/ld/testsuite/ld-mmix/data1.s @@ -0,0 +1,2 @@ + LOC #20 << 56 +xx OCTA Main+44 diff --git a/ld/testsuite/ld-mmix/dloc1.s b/ld/testsuite/ld-mmix/dloc1.s new file mode 100644 index 0000000..b8b009c --- /dev/null +++ b/ld/testsuite/ld-mmix/dloc1.s @@ -0,0 +1,4 @@ + LOC #20 << 56 + #200 +dloc1 TETRA 4,5,6 + .global dloc1 + diff --git a/ld/testsuite/ld-mmix/dloc2.s b/ld/testsuite/ld-mmix/dloc2.s new file mode 100644 index 0000000..704da08 --- /dev/null +++ b/ld/testsuite/ld-mmix/dloc2.s @@ -0,0 +1,3 @@ + LOC #20 << 56 + #200 +dloc2 TETRA 7,8,9 + .global dloc2 diff --git a/ld/testsuite/ld-mmix/ext1-254.s b/ld/testsuite/ld-mmix/ext1-254.s new file mode 100644 index 0000000..baaf22f --- /dev/null +++ b/ld/testsuite/ld-mmix/ext1-254.s @@ -0,0 +1,2 @@ + .global ext1 +ext1 IS 254 diff --git a/ld/testsuite/ld-mmix/ext1.s b/ld/testsuite/ld-mmix/ext1.s new file mode 100644 index 0000000..d69420e --- /dev/null +++ b/ld/testsuite/ld-mmix/ext1.s @@ -0,0 +1,2 @@ + .global ext1 +ext1 IS 252 diff --git a/ld/testsuite/ld-mmix/ext1g.s b/ld/testsuite/ld-mmix/ext1g.s new file mode 100644 index 0000000..1a167ab --- /dev/null +++ b/ld/testsuite/ld-mmix/ext1g.s @@ -0,0 +1,2 @@ + .global ext1 +ext1 GREG diff --git a/ld/testsuite/ld-mmix/ext1l.s b/ld/testsuite/ld-mmix/ext1l.s new file mode 100644 index 0000000..b7e6096 --- /dev/null +++ b/ld/testsuite/ld-mmix/ext1l.s @@ -0,0 +1,2 @@ + .global ext1 +ext1 SWYM 4,8,16 diff --git a/ld/testsuite/ld-mmix/getaa-1b.d b/ld/testsuite/ld-mmix/getaa-1b.d new file mode 100644 index 0000000..84b477d --- /dev/null +++ b/ld/testsuite/ld-mmix/getaa-1b.d @@ -0,0 +1,24 @@ +#source: start.s +#source: a.s +#source: getaa.s +#as: -x +#ld: -m elf64mmix +#objdump: -dr + +.*: file format elf64-mmix + +Disassembly of section \.text: + +0+ <_start>: + 0+: e3fd0001 setl \$253,0x1 + +0+4 <a>: + 4: e3fd0004 setl \$253,0x4 + +0+8 <getaa>: + 8: e3fd0002 setl \$253,0x2 + c: e37b0004 setl \$123,0x4 + 10: e67b0000 incml \$123,0x0 + 14: e57b0000 incmh \$123,0x0 + 18: e47b0000 inch \$123,0x0 + 1c: e3fd0003 setl \$253,0x3 diff --git a/ld/testsuite/ld-mmix/getaa-1f.d b/ld/testsuite/ld-mmix/getaa-1f.d new file mode 100644 index 0000000..cc628a2 --- /dev/null +++ b/ld/testsuite/ld-mmix/getaa-1f.d @@ -0,0 +1,24 @@ +#source: start.s +#source: getaa.s +#source: a.s +#as: -x +#ld: -m elf64mmix +#objdump: -dr + +.*: file format elf64-mmix + +Disassembly of section \.text: + +0+ <_start>: + 0+: e3fd0001 setl \$253,0x1 + +0+4 <getaa>: + 4: e3fd0002 setl \$253,0x2 + 8: e37b001c setl \$123,0x1c + c: e67b0000 incml \$123,0x0 + 10: e57b0000 incmh \$123,0x0 + 14: e47b0000 inch \$123,0x0 + 18: e3fd0003 setl \$253,0x3 + +0+1c <a>: + 1c: e3fd0004 setl \$253,0x4 diff --git a/ld/testsuite/ld-mmix/getaa-2b.d b/ld/testsuite/ld-mmix/getaa-2b.d new file mode 100644 index 0000000..4300128 --- /dev/null +++ b/ld/testsuite/ld-mmix/getaa-2b.d @@ -0,0 +1,21 @@ +#source: start.s +#source: a.s +#source: getaa.s +#as: -no-expand +#ld: -m elf64mmix +#objdump: -dr + +.*: file format elf64-mmix + +Disassembly of section \.text: + +0+ <_start>: + 0+: e3fd0001 setl \$253,0x1 + +0+4 <a>: + 4: e3fd0004 setl \$253,0x4 + +0+8 <getaa>: + 8: e3fd0002 setl \$253,0x2 + c: f57bfffe geta \$123,4 <a> + 10: e3fd0003 setl \$253,0x3 diff --git a/ld/testsuite/ld-mmix/getaa-2f.d b/ld/testsuite/ld-mmix/getaa-2f.d new file mode 100644 index 0000000..fd32834 --- /dev/null +++ b/ld/testsuite/ld-mmix/getaa-2f.d @@ -0,0 +1,21 @@ +#source: start.s +#source: getaa.s +#source: a.s +#as: -no-expand +#ld: -m elf64mmix +#objdump: -dr + +.*: file format elf64-mmix + +Disassembly of section \.text: + +0+ <_start>: + 0+: e3fd0001 setl \$253,0x1 + +0+4 <getaa>: + 4: e3fd0002 setl \$253,0x2 + 8: f47b0002 geta \$123,10 <a> + c: e3fd0003 setl \$253,0x3 + +0+10 <a>: + 10: e3fd0004 setl \$253,0x4 diff --git a/ld/testsuite/ld-mmix/getaa-4b.d b/ld/testsuite/ld-mmix/getaa-4b.d new file mode 100644 index 0000000..1a3614b --- /dev/null +++ b/ld/testsuite/ld-mmix/getaa-4b.d @@ -0,0 +1,26 @@ +#source: start.s +#source: a.s +#source: pad2p18m32.s +#source: pad16.s +#source: pad4.s +#source: pad4.s +#source: getaa.s +#as: -no-expand +#ld: -m elf64mmix +#objdump: -dr + +.*: file format elf64-mmix + +Disassembly of section \.text: + +0+ <_start>: + 0: e3fd0001 setl \$253,0x1 + +0+4 <a>: + 4: e3fd0004 setl \$253,0x4 + \.\.\. + +0+40000 <getaa>: + 40000: e3fd0002 setl \$253,0x2 + 40004: f57b0000 geta \$123,4 <a> + 40008: e3fd0003 setl \$253,0x3 diff --git a/ld/testsuite/ld-mmix/getaa-4f.d b/ld/testsuite/ld-mmix/getaa-4f.d new file mode 100644 index 0000000..30062a6 --- /dev/null +++ b/ld/testsuite/ld-mmix/getaa-4f.d @@ -0,0 +1,25 @@ +#source: start.s +#source: getaa.s +#source: pad2p18m32.s +#source: pad16.s +#source: pad4.s +#source: a.s +#as: -no-expand +#ld: -m elf64mmix +#objdump: -dr + +.*: file format elf64-mmix + +Disassembly of section \.text: + +0+ <_start>: + 0: e3fd0001 setl \$253,0x1 + +0+4 <getaa>: + 4: e3fd0002 setl \$253,0x2 + 8: f47bffff geta \$123,40004 <a> + c: e3fd0003 setl \$253,0x3 + \.\.\. + +0+40004 <a>: + 40004: e3fd0004 setl \$253,0x4 diff --git a/ld/testsuite/ld-mmix/getaa-6b.d b/ld/testsuite/ld-mmix/getaa-6b.d new file mode 100644 index 0000000..072142a --- /dev/null +++ b/ld/testsuite/ld-mmix/getaa-6b.d @@ -0,0 +1,11 @@ +#source: start.s +#source: a.s +#source: pad2p18m32.s +#source: pad16.s +#source: pad4.s +#source: pad4.s +#source: pad4.s +#source: getaa.s +#as: -no-expand +#ld: -m elf64mmix +#error: relocation truncated to fit: R_MMIX_ADDR19 a$ diff --git a/ld/testsuite/ld-mmix/getaa-6f.d b/ld/testsuite/ld-mmix/getaa-6f.d new file mode 100644 index 0000000..cfef86c --- /dev/null +++ b/ld/testsuite/ld-mmix/getaa-6f.d @@ -0,0 +1,10 @@ +#source: start.s +#source: getaa.s +#source: pad2p18m32.s +#source: pad16.s +#source: pad4.s +#source: pad4.s +#source: a.s +#as: -no-expand +#ld: -m elf64mmix +#error: relocation truncated to fit: R_MMIX_ADDR19 a$ diff --git a/ld/testsuite/ld-mmix/getaa-7b.d b/ld/testsuite/ld-mmix/getaa-7b.d new file mode 100644 index 0000000..7a71c31 --- /dev/null +++ b/ld/testsuite/ld-mmix/getaa-7b.d @@ -0,0 +1,24 @@ +#source: start.s +#source: a.s +#source: getaa.s +#as: -x +#ld: -m mmo +#objdump: -dr + +.*: file format mmo + +Disassembly of section .text: + +0+ <(Main|_start)>: + 0+: e3fd0001 setl \$253,0x1 + +0+4 <a>: + 4: e3fd0004 setl \$253,0x4 + +0+8 <getaa>: + 8: e3fd0002 setl \$253,0x2 + c: e37b0004 setl \$123,0x4 + 10: e67b0000 incml \$123,0x0 + 14: e57b0000 incmh \$123,0x0 + 18: e47b0000 inch \$123,0x0 + 1c: e3fd0003 setl \$253,0x3 diff --git a/ld/testsuite/ld-mmix/getaa-7f.d b/ld/testsuite/ld-mmix/getaa-7f.d new file mode 100644 index 0000000..ea831a9 --- /dev/null +++ b/ld/testsuite/ld-mmix/getaa-7f.d @@ -0,0 +1,24 @@ +#source: start.s +#source: getaa.s +#source: a.s +#as: -x +#ld: -m mmo +#objdump: -dr + +.*: file format mmo + +Disassembly of section \.text: + +0+ <(Main|_start)>: + 0+: e3fd0001 setl \$253,0x1 + +0+4 <getaa>: + 4: e3fd0002 setl \$253,0x2 + 8: e37b001c setl \$123,0x1c + c: e67b0000 incml \$123,0x0 + 10: e57b0000 incmh \$123,0x0 + 14: e47b0000 inch \$123,0x0 + 18: e3fd0003 setl \$253,0x3 + +0+1c <a>: + 1c: e3fd0004 setl \$253,0x4 diff --git a/ld/testsuite/ld-mmix/getaa-8b.d b/ld/testsuite/ld-mmix/getaa-8b.d new file mode 100644 index 0000000..a54cc10 --- /dev/null +++ b/ld/testsuite/ld-mmix/getaa-8b.d @@ -0,0 +1,21 @@ +#source: start.s +#source: a.s +#source: getaa.s +#as: -no-expand +#ld: -m mmo +#objdump: -dr + +.*: file format mmo + +Disassembly of section \.text: + +0+ <(Main|_start)>: + 0+: e3fd0001 setl \$253,0x1 + +0+4 <a>: + 4: e3fd0004 setl \$253,0x4 + +0+8 <getaa>: + 8: e3fd0002 setl \$253,0x2 + c: f57bfffe geta \$123,4 <a> + 10: e3fd0003 setl \$253,0x3 diff --git a/ld/testsuite/ld-mmix/getaa-8f.d b/ld/testsuite/ld-mmix/getaa-8f.d new file mode 100644 index 0000000..4ba7307 --- /dev/null +++ b/ld/testsuite/ld-mmix/getaa-8f.d @@ -0,0 +1,21 @@ +#source: start.s +#source: getaa.s +#source: a.s +#as: -no-expand +#ld: -m mmo +#objdump: -dr + +.*: file format mmo + +Disassembly of section \.text: + +0+ <(Main|_start)>: + 0+: e3fd0001 setl \$253,0x1 + +0+4 <getaa>: + 4: e3fd0002 setl \$253,0x2 + 8: f47b0002 geta \$123,10 <a> + c: e3fd0003 setl \$253,0x3 + +0+10 <a>: + 10: e3fd0004 setl \$253,0x4 diff --git a/ld/testsuite/ld-mmix/getaa.s b/ld/testsuite/ld-mmix/getaa.s new file mode 100644 index 0000000..cc4dfb7 --- /dev/null +++ b/ld/testsuite/ld-mmix/getaa.s @@ -0,0 +1,7 @@ +* Just geta an external symbol, with some padding. + .text + .global getaa +getaa: + SET $253,2 + GETA $123,a + SET $253,3 diff --git a/ld/testsuite/ld-mmix/getaa12b.d b/ld/testsuite/ld-mmix/getaa12b.d new file mode 100644 index 0000000..c4e49e4 --- /dev/null +++ b/ld/testsuite/ld-mmix/getaa12b.d @@ -0,0 +1,26 @@ +#source: start.s +#source: a.s +#source: pad2p18m32.s +#source: pad16.s +#source: pad4.s +#source: pad4.s +#source: getaa.s +#as: -no-expand +#ld: -m mmo +#objdump: -dr + +.*: file format mmo + +Disassembly of section \.text: + +0+ <(Main|_start)>: + 0: e3fd0001 setl \$253,0x1 + +0+4 <a>: + 4: e3fd0004 setl \$253,0x4 + \.\.\. + +0+40000 <getaa>: + 40000: e3fd0002 setl \$253,0x2 + 40004: f57b0000 geta \$123,4 <a> + 40008: e3fd0003 setl \$253,0x3 diff --git a/ld/testsuite/ld-mmix/getaa12f.d b/ld/testsuite/ld-mmix/getaa12f.d new file mode 100644 index 0000000..d80a39c --- /dev/null +++ b/ld/testsuite/ld-mmix/getaa12f.d @@ -0,0 +1,25 @@ +#source: start.s +#source: getaa.s +#source: pad2p18m32.s +#source: pad16.s +#source: pad4.s +#source: a.s +#as: -no-expand +#ld: -m mmo +#objdump: -dr + +.*: file format mmo + +Disassembly of section \.text: + +0+ <(Main|_start)>: + 0: e3fd0001 setl \$253,0x1 + +0+4 <getaa>: + 4: e3fd0002 setl \$253,0x2 + 8: f47bffff geta \$123,40004 <a> + c: e3fd0003 setl \$253,0x3 + \.\.\. + +0+40004 <a>: + 40004: e3fd0004 setl \$253,0x4 diff --git a/ld/testsuite/ld-mmix/getaa14b.d b/ld/testsuite/ld-mmix/getaa14b.d new file mode 100644 index 0000000..ca37229 --- /dev/null +++ b/ld/testsuite/ld-mmix/getaa14b.d @@ -0,0 +1,11 @@ +#source: start.s +#source: a.s +#source: pad2p18m32.s +#source: pad16.s +#source: pad4.s +#source: pad4.s +#source: pad4.s +#source: getaa.s +#as: -no-expand +#ld: -m mmo +#error: relocation truncated to fit: R_MMIX_ADDR19 a$ diff --git a/ld/testsuite/ld-mmix/getaa14f.d b/ld/testsuite/ld-mmix/getaa14f.d new file mode 100644 index 0000000..88a3b7d --- /dev/null +++ b/ld/testsuite/ld-mmix/getaa14f.d @@ -0,0 +1,10 @@ +#source: start.s +#source: getaa.s +#source: pad2p18m32.s +#source: pad16.s +#source: pad4.s +#source: pad4.s +#source: a.s +#as: -no-expand +#ld: -m mmo +#error: relocation truncated to fit: R_MMIX_ADDR19 a$ diff --git a/ld/testsuite/ld-mmix/greg-1.d b/ld/testsuite/ld-mmix/greg-1.d new file mode 100644 index 0000000..d1d0371 --- /dev/null +++ b/ld/testsuite/ld-mmix/greg-1.d @@ -0,0 +1,36 @@ +#source: greg-1.s +#source: gregldo1.s +#source: start.s +#ld: -m elf64mmix +#objdump: -dt + +# Most simple greg usage: relocate to each possible location within an +# insn. + +.*: file format elf64-mmix + +SYMBOL TABLE: +0+ l d .text 0+ +2000000000000000 l d .data 0+ +2000000000000000 l d .sbss 0+ +2000000000000000 l d .bss 0+ +0+7f0 l d \.MMIX\.reg_contents 0+ +0+ l d \*ABS\* 0+ +0+ l d \*ABS\* 0+ +0+ l d \*ABS\* 0+ +0+c g \.text 0+ _start +0+fe g \*REG\* 0+ areg +2000000000000000 g O \*ABS\* 0+ __bss_start +2000000000000000 g O \*ABS\* 0+ _edata +2000000000000000 g O \*ABS\* 0+ _end +0+c g O \.text 0+ _start\. + +Disassembly of section \.text: + +0+ <_start-0xc>: + 0: 8c0c20fe ldo \$12,\$32,\$254 + 4: 8d7bfe22 ldo \$123,\$254,34 + 8: 8dfeea38 ldo \$254,\$234,56 + +0+c <_start>: + c: e3fd0001 setl \$253,0x1 diff --git a/ld/testsuite/ld-mmix/greg-1.s b/ld/testsuite/ld-mmix/greg-1.s new file mode 100644 index 0000000..821460c --- /dev/null +++ b/ld/testsuite/ld-mmix/greg-1.s @@ -0,0 +1,3 @@ +# Have a single GREG register allocation. + .global areg +areg GREG 123456789101112 diff --git a/ld/testsuite/ld-mmix/greg-10.d b/ld/testsuite/ld-mmix/greg-10.d new file mode 100644 index 0000000..acc702d --- /dev/null +++ b/ld/testsuite/ld-mmix/greg-10.d @@ -0,0 +1,25 @@ +#source: greg-1.s +#source: gregldo1.s +#source: start.s +#ld: -m mmo +#objdump: -dt + +# Most simple greg usage: relocate to each possible location within an +# insn; mmo. + +.*: file format mmo + +SYMBOL TABLE: +0+c g \.text Main +0+c g \.text _start +0+fe g \*REG\* areg + +Disassembly of section \.text: + +0+ <Main-0xc>: + 0: 8c0c20fe ldo \$12,\$32,areg + 4: 8d7bfe22 ldo \$123,areg,34 + 8: 8dfeea38 ldo areg,\$234,56 + +0+c <(Main|_start)>: + c: e3fd0001 setl \$253,0x1 diff --git a/ld/testsuite/ld-mmix/greg-11.d b/ld/testsuite/ld-mmix/greg-11.d new file mode 100644 index 0000000..5fc474b --- /dev/null +++ b/ld/testsuite/ld-mmix/greg-11.d @@ -0,0 +1,39 @@ +#source: greg-1.s +#source: gregldo1.s +#source: gregget2.s +#source: a.s +#source: greg-3.s +#source: start.s +#source: greg-2.s +#as: -x +#ld: -m mmo +#objdump: -dt + +# Have two used gregs and one unused, mmo. + +.*: file format mmo + +SYMBOL TABLE: +0+20 g \.text Main +0+fe g \*REG\* b +0+20 g \.text _start +0+fc g \*REG\* areg +0+fd g \*REG\* c +0+1c g \.text a + +Disassembly of section \.text: + +0+ <a-0x1c>: + 0: 8c0c20fc ldo \$12,\$32,areg + 4: 8d7bfc22 ldo \$123,areg,34 + 8: 8dfcea38 ldo areg,\$234,56 + c: e3fe001c setl b,0x1c + 10: e6fe0000 incml b,0x0 + 14: e5fe0000 incmh b,0x0 + 18: e4fe0000 inch b,0x0 + +0+1c <a>: + 1c: e3fd0004 setl c,0x4 + +0+20 <(Main|_start)>: + 20: e3fd0001 setl c,0x1 diff --git a/ld/testsuite/ld-mmix/greg-11b.d b/ld/testsuite/ld-mmix/greg-11b.d new file mode 100644 index 0000000..50665d0 --- /dev/null +++ b/ld/testsuite/ld-mmix/greg-11b.d @@ -0,0 +1,32 @@ +#source: greg-1.s +#source: gregldo1.s +#source: gregget2.s +#source: a.s +#source: greg-3.s +#source: start.s +#source: greg-2.s +#as: -x +#ld: -m mmo +#objdump: -str + +# Have two used gregs and one unused, mmo; display contents to visualize +# mmo bug with register contents. + +.*: file format mmo + +SYMBOL TABLE: +0+20 g \.text Main +0+fe g \*REG\* b +0+20 g \.text _start +0+fc g \*REG\* areg +0+fd g \*REG\* c +0+1c g \.text a + + +Contents of section \.text: + 0+ 8c0c20fc 8d7bfc22 8dfcea38 e3fe001c .* + 0+10 e6fe0000 e5fe0000 e4fe0000 e3fd0004 .* + 0+20 e3fd0001 .* +Contents of section \.MMIX\.reg_contents: + 07e0 00007048 860f3a38 00000000 00000042 .* + 07f0 007acf50 505a30a2 .* diff --git a/ld/testsuite/ld-mmix/greg-12.d b/ld/testsuite/ld-mmix/greg-12.d new file mode 100644 index 0000000..b438632 --- /dev/null +++ b/ld/testsuite/ld-mmix/greg-12.d @@ -0,0 +1,34 @@ +#source: greg-1.s +#source: gregget1.s +#source: start.s +#source: a.s +#as: -x +#ld: -m mmo +#objdump: -dt + +# A greg usage with an expanding insn. The register reloc must be +# evaluated before the expanding reloc. Here, it doesn't appear in the +# wrong order, and it doesn't seem like they would naturally appear in the +# wrong order, but anyway; mmo. + +.*: file format mmo + +SYMBOL TABLE: +0+10 g \.text Main +0+10 g \.text _start +0+fe g \*REG\* areg +0+14 g \.text a + +Disassembly of section \.text: + +0+ <(Main|_start)-0x10>: + 0: e3fe0014 setl areg,0x14 + 4: e6fe0000 incml areg,0x0 + 8: e5fe0000 incmh areg,0x0 + c: e4fe0000 inch areg,0x0 + +0+10 <(Main|_start)>: + 10: e3fd0001 setl \$253,0x1 + +0+14 <a>: + 14: e3fd0004 setl \$253,0x4 diff --git a/ld/testsuite/ld-mmix/greg-13.d b/ld/testsuite/ld-mmix/greg-13.d new file mode 100644 index 0000000..091cf46 --- /dev/null +++ b/ld/testsuite/ld-mmix/greg-13.d @@ -0,0 +1,33 @@ +#source: greg-1.s +#source: gregbza1.s +#source: start.s +#source: a.s +#as: -x +#ld: -m mmo +#objdump: -dt + +# Like greg-3, but a different expanding insn, mmo. + +.*: file format mmo + +SYMBOL TABLE: +0+18 g \.text Main +0+18 g \.text _start +0+fe g \*REG\* areg +0+1c g \.text a + +Disassembly of section \.text: + +0+ <(Main|_start)-0x18>: + 0: 5afe0006 pbnz areg,18 <(Main|_start)> + 4: e3ff001c setl \$255,0x1c + 8: e6ff0000 incml \$255,0x0 + c: e5ff0000 incmh \$255,0x0 + 10: e4ff0000 inch \$255,0x0 + 14: 9fffff00 go \$255,\$255,0 + +0+18 <(Main|_start)>: + 18: e3fd0001 setl \$253,0x1 + +0+1c <a>: + 1c: e3fd0004 setl \$253,0x4 diff --git a/ld/testsuite/ld-mmix/greg-14.d b/ld/testsuite/ld-mmix/greg-14.d new file mode 100644 index 0000000..cacfbd6 --- /dev/null +++ b/ld/testsuite/ld-mmix/greg-14.d @@ -0,0 +1,32 @@ +#source: greg-1.s +#source: gregpsj1.s +#source: start.s +#source: a.s +#as: -x +#ld: -m mmo +#objdump: -dt + +# Like greg-3, but a different expanding insn. + +.*: file format mmo + +SYMBOL TABLE: +0+14 g \.text Main +0+14 g \.text _start +0+fe g \*REG\* areg +0+18 g \.text a + +Disassembly of section \.text: + +0+ <(Main|_start)-0x14>: + 0: e3ff0018 setl \$255,0x18 + 4: e6ff0000 incml \$255,0x0 + 8: e5ff0000 incmh \$255,0x0 + c: e4ff0000 inch \$255,0x0 + 10: bffeff00 pushgo areg,\$255,0 + +0+14 <(Main|_start)>: + 14: e3fd0001 setl \$253,0x1 + +0+18 <a>: + 18: e3fd0004 setl \$253,0x4 diff --git a/ld/testsuite/ld-mmix/greg-15.d b/ld/testsuite/ld-mmix/greg-15.d new file mode 100644 index 0000000..4b54153 --- /dev/null +++ b/ld/testsuite/ld-mmix/greg-15.d @@ -0,0 +1,59 @@ +#source: gregget1.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-1.s +#source: a.s +#source: start.s +#as: -x +#ld: -m mmo +#objdump: -dt + +# Allocating the maximum number of gregs and referring to one at the end +# still works, mmo. + +.*: file format mmo + +SYMBOL TABLE: +0+14 g \.text Main +0+14 g \.text _start +0+fe g \*REG\* areg +0+10 g \.text a + +Disassembly of section \.text: + +0+ <a-0x10>: + 0: e3fe0010 setl areg,0x10 + 4: e6fe0000 incml areg,0x0 + 8: e5fe0000 incmh areg,0x0 + c: e4fe0000 inch areg,0x0 + +0+10 <a>: + 10: e3fd0004 setl \$253,0x4 + +0+14 <(Main|_start)>: + 14: e3fd0001 setl \$253,0x1 diff --git a/ld/testsuite/ld-mmix/greg-16.d b/ld/testsuite/ld-mmix/greg-16.d new file mode 100644 index 0000000..80b2338 --- /dev/null +++ b/ld/testsuite/ld-mmix/greg-16.d @@ -0,0 +1,59 @@ +#source: gregget1.s +#source: greg-1.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: a.s +#source: start.s +#as: -x +#ld: -m mmo +#objdump: -dt + +# Allocating the maximum number of gregs and referring to one at the +# *other* end still works, mmo. + +.*: file format mmo + +SYMBOL TABLE: +0+14 g \.text Main +0+14 g \.text _start +0+20 g \*REG\* areg +0+10 g \.text a + +Disassembly of section \.text: + +0+ <a-0x10>: + 0: e3200010 setl areg,0x10 + 4: e6200000 incml areg,0x0 + 8: e5200000 incmh areg,0x0 + c: e4200000 inch areg,0x0 + +0+10 <a>: + 10: e3fd0004 setl \$253,0x4 + +0+14 <(Main|_start)>: + 14: e3fd0001 setl \$253,0x1 diff --git a/ld/testsuite/ld-mmix/greg-17.d b/ld/testsuite/ld-mmix/greg-17.d new file mode 100644 index 0000000..e1af4b5 --- /dev/null +++ b/ld/testsuite/ld-mmix/greg-17.d @@ -0,0 +1,37 @@ +#source: gregget1.s +#source: greg-1.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: a.s +#source: start.s +#as: -x +#ld: -m mmo +#error: Too many global registers: 224, max 223 + +# Allocating the maximum number of gregs *plus one* is an error, mmo. diff --git a/ld/testsuite/ld-mmix/greg-18.d b/ld/testsuite/ld-mmix/greg-18.d new file mode 100644 index 0000000..ed1bbaf --- /dev/null +++ b/ld/testsuite/ld-mmix/greg-18.d @@ -0,0 +1,39 @@ +#source: gregget1.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-1.s +#source: a.s +#source: start.s +#as: -x +#ld: -m mmo +#objdump: -dt +#error: Too many global registers: 224, max 223 + +# Allocating the maximum number of gregs *plus one* is an error; other end +# of the stick, mmo. diff --git a/ld/testsuite/ld-mmix/greg-19.d b/ld/testsuite/ld-mmix/greg-19.d new file mode 100644 index 0000000..6613133 --- /dev/null +++ b/ld/testsuite/ld-mmix/greg-19.d @@ -0,0 +1,32 @@ +#source: start.s +#source: aregm.s +#source: gregldo1.s +#ld: -m elf64mmix +#objdump: -str + +.*: file format elf64-mmix + +SYMBOL TABLE: +0+ l d \.text 0+ +2000000000000000 l d \.data 0+ +2000000000000000 l d \.sbss 0+ +2000000000000000 l d \.bss 0+ +0+7f0 l d \.MMIX\.reg_contents 0+ +0+ l d \*ABS\* 0+ +0+ l d \*ABS\* 0+ +0+ l d \*ABS\* 0+ +0+ g F \.text 0+ Main +0+ g \.text 0+ _start +0+fe g \*REG\* 0+ areg +2000000000000000 g O \*ABS\* 0+ __bss_start +2000000000000000 g O \*ABS\* 0+ _edata +2000000000000000 g O \*ABS\* 0+ _end +0+ g O \.text 0+ _start\. + +Contents of section \.text: + 0+ e3fd0001 8f03fe10 8e0307fe 8f05fe04 .* + 0+10 8c0c20fe 8d7bfe22 8dfeea38 .* +Contents of section \.data: +Contents of section \.sbss: +Contents of section \.MMIX\.reg_contents: + 07f0 00000000 00000004 .* diff --git a/ld/testsuite/ld-mmix/greg-2.d b/ld/testsuite/ld-mmix/greg-2.d new file mode 100644 index 0000000..0ac34c1 --- /dev/null +++ b/ld/testsuite/ld-mmix/greg-2.d @@ -0,0 +1,50 @@ +#source: greg-1.s +#source: gregldo1.s +#source: gregget2.s +#source: a.s +#source: greg-3.s +#source: start.s +#source: greg-2.s +#as: -x +#ld: -m elf64mmix +#objdump: -dt + +# Have two used gregs and one unused. + +.*: file format elf64-mmix + +SYMBOL TABLE: +0+ l d .text 0+ +2000000000000000 l d .data 0+ +2000000000000000 l d .sbss 0+ +2000000000000000 l d .bss 0+ +0+7e0 l d \.MMIX\.reg_contents 0+ +0+ l d \*ABS\* 0+ +0+ l d \*ABS\* 0+ +0+ l d \*ABS\* 0+ +0+fe g \*REG\* 0+ b +0+20 g \.text 0+ _start +0+fc g \*REG\* 0+ areg +0+fd g \*REG\* 0+ c +2000000000000000 g O \*ABS\* 0+ __bss_start +2000000000000000 g O \*ABS\* 0+ _edata +2000000000000000 g O \*ABS\* 0+ _end +0+20 g O \.text 0+ _start\. +0+1c g \.text 0+ a + +Disassembly of section \.text: + +0+ <a-0x1c>: + 0: 8c0c20fc ldo \$12,\$32,\$252 + 4: 8d7bfc22 ldo \$123,\$252,34 + 8: 8dfcea38 ldo \$252,\$234,56 + c: e3fe001c setl \$254,0x1c + 10: e6fe0000 incml \$254,0x0 + 14: e5fe0000 incmh \$254,0x0 + 18: e4fe0000 inch \$254,0x0 + +0+1c <a>: + 1c: e3fd0004 setl \$253,0x4 + +0+20 <_start>: + 20: e3fd0001 setl \$253,0x1 diff --git a/ld/testsuite/ld-mmix/greg-2.s b/ld/testsuite/ld-mmix/greg-2.s new file mode 100644 index 0000000..588cbf1 --- /dev/null +++ b/ld/testsuite/ld-mmix/greg-2.s @@ -0,0 +1,3 @@ +# Have another GREG register allocation. + .global b +b GREG 34567891011121314 diff --git a/ld/testsuite/ld-mmix/greg-20.d b/ld/testsuite/ld-mmix/greg-20.d new file mode 100644 index 0000000..10daa08 --- /dev/null +++ b/ld/testsuite/ld-mmix/greg-20.d @@ -0,0 +1,18 @@ +#source: start.s +#source: aregm.s +#source: gregldo1.s +#ld: -m mmo +#objdump: -str + +.*: file format mmo + +SYMBOL TABLE: +0+ g \.text Main +0+ g \.text _start +0+fe g \*REG\* areg + +Contents of section \.text: + 0+ e3fd0001 8f03fe10 8e0307fe 8f05fe04 .* + 0+10 8c0c20fe 8d7bfe22 8dfeea38 .* +Contents of section \.MMIX\.reg_contents: + 07f0 00000000 00000004 .* diff --git a/ld/testsuite/ld-mmix/greg-3.d b/ld/testsuite/ld-mmix/greg-3.d new file mode 100644 index 0000000..0531393 --- /dev/null +++ b/ld/testsuite/ld-mmix/greg-3.d @@ -0,0 +1,45 @@ +#source: greg-1.s +#source: gregget1.s +#source: start.s +#source: a.s +#as: -x +#ld: -m elf64mmix +#objdump: -dt + +# A greg usage with an expanding insn. The register reloc must be +# evaluated before the expanding reloc. Here, it doesn't appear in the +# wrong order, and it doesn't seem like they would naturally appear in the +# wrong order, but anyway. + +.*: file format elf64-mmix + +SYMBOL TABLE: +0+ l d .text 0+ +2000000000000000 l d .data 0+ +2000000000000000 l d .sbss 0+ +2000000000000000 l d .bss 0+ +0+7f0 l d \.MMIX\.reg_contents 0+ +0+ l d \*ABS\* 0+ +0+ l d \*ABS\* 0+ +0+ l d \*ABS\* 0+ +0+10 g \.text 0+ _start +0+fe g \*REG\* 0+ areg +2000000000000000 g O \*ABS\* 0+ __bss_start +2000000000000000 g O \*ABS\* 0+ _edata +2000000000000000 g O \*ABS\* 0+ _end +0+10 g O \.text 0+ _start\. +0+14 g \.text 0+ a + +Disassembly of section \.text: + +0+ <_start-0x10>: + 0: e3fe0014 setl \$254,0x14 + 4: e6fe0000 incml \$254,0x0 + 8: e5fe0000 incmh \$254,0x0 + c: e4fe0000 inch \$254,0x0 + +0+10 <_start>: + 10: e3fd0001 setl \$253,0x1 + +0+14 <a>: + 14: e3fd0004 setl \$253,0x4 diff --git a/ld/testsuite/ld-mmix/greg-3.s b/ld/testsuite/ld-mmix/greg-3.s new file mode 100644 index 0000000..5248591 --- /dev/null +++ b/ld/testsuite/ld-mmix/greg-3.s @@ -0,0 +1,3 @@ +# Have yet another GREG register allocation. + .global c +c GREG #42 diff --git a/ld/testsuite/ld-mmix/greg-4.d b/ld/testsuite/ld-mmix/greg-4.d new file mode 100644 index 0000000..c5e74bb --- /dev/null +++ b/ld/testsuite/ld-mmix/greg-4.d @@ -0,0 +1,44 @@ +#source: greg-1.s +#source: gregbza1.s +#source: start.s +#source: a.s +#as: -x +#ld: -m elf64mmix +#objdump: -dt + +# Like greg-3, but a different expanding insn. + +.*: file format elf64-mmix + +SYMBOL TABLE: +0+ l d .text 0+ +2000000000000000 l d .data 0+ +2000000000000000 l d .sbss 0+ +2000000000000000 l d .bss 0+ +0+7f0 l d \.MMIX\.reg_contents 0+ +0+ l d \*ABS\* 0+ +0+ l d \*ABS\* 0+ +0+ l d \*ABS\* 0+ +0+18 g \.text 0+ _start +0+fe g \*REG\* 0+ areg +2000000000000000 g O \*ABS\* 0+ __bss_start +2000000000000000 g O \*ABS\* 0+ _edata +2000000000000000 g O \*ABS\* 0+ _end +0+18 g O \.text 0+ _start\. +0+1c g \.text 0+ a + +Disassembly of section \.text: + +0+ <_start-0x18>: + 0: 5afe0006 pbnz \$254,18 <_start> + 4: e3ff001c setl \$255,0x1c + 8: e6ff0000 incml \$255,0x0 + c: e5ff0000 incmh \$255,0x0 + 10: e4ff0000 inch \$255,0x0 + 14: 9fffff00 go \$255,\$255,0 + +0+18 <_start>: + 18: e3fd0001 setl \$253,0x1 + +0+1c <a>: + 1c: e3fd0004 setl \$253,0x4 diff --git a/ld/testsuite/ld-mmix/greg-4.s b/ld/testsuite/ld-mmix/greg-4.s new file mode 100644 index 0000000..5e5a30f --- /dev/null +++ b/ld/testsuite/ld-mmix/greg-4.s @@ -0,0 +1,2 @@ +# A single local greg. +lsym GREG 78 diff --git a/ld/testsuite/ld-mmix/greg-5.d b/ld/testsuite/ld-mmix/greg-5.d new file mode 100644 index 0000000..4c92607 --- /dev/null +++ b/ld/testsuite/ld-mmix/greg-5.d @@ -0,0 +1,43 @@ +#source: greg-1.s +#source: gregpsj1.s +#source: start.s +#source: a.s +#as: -x +#ld: -m elf64mmix +#objdump: -dt + +# Like greg-3, but a different expanding insn. + +.*: file format elf64-mmix + +SYMBOL TABLE: +0+ l d .text 0+ +2000000000000000 l d .data 0+ +2000000000000000 l d .sbss 0+ +2000000000000000 l d .bss 0+ +0+7f0 l d \.MMIX\.reg_contents 0+ +0+ l d \*ABS\* 0+ +0+ l d \*ABS\* 0+ +0+ l d \*ABS\* 0+ +0+14 g \.text 0+ _start +0+fe g \*REG\* 0+ areg +2000000000000000 g O \*ABS\* 0+ __bss_start +2000000000000000 g O \*ABS\* 0+ _edata +2000000000000000 g O \*ABS\* 0+ _end +0+14 g O \.text 0+ _start\. +0+18 g \.text 0+ a + +Disassembly of section \.text: + +0+ <_start-0x14>: + 0: e3ff0018 setl \$255,0x18 + 4: e6ff0000 incml \$255,0x0 + 8: e5ff0000 incmh \$255,0x0 + c: e4ff0000 inch \$255,0x0 + 10: bffeff00 pushgo \$254,\$255,0 + +0+14 <_start>: + 14: e3fd0001 setl \$253,0x1 + +0+18 <a>: + 18: e3fd0004 setl \$253,0x4 diff --git a/ld/testsuite/ld-mmix/greg-5.s b/ld/testsuite/ld-mmix/greg-5.s new file mode 100644 index 0000000..65400af --- /dev/null +++ b/ld/testsuite/ld-mmix/greg-5.s @@ -0,0 +1,20 @@ +# 16 local gregs. +A GREG +B GREG +C GREG +D GREG + +E GREG +F GREG +G GREG +H GREG + +I GREG +J GREG +K GREG +L GREG + +M GREG +N GREG +O GREG +P GREG diff --git a/ld/testsuite/ld-mmix/greg-6.d b/ld/testsuite/ld-mmix/greg-6.d new file mode 100644 index 0000000..3ec5e4f --- /dev/null +++ b/ld/testsuite/ld-mmix/greg-6.d @@ -0,0 +1,292 @@ +#source: gregget1.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-1.s +#source: a.s +#source: start.s +#as: -x +#ld: -m elf64mmix +#objdump: -dt + +# Allocating the maximum number of gregs and referring to one at the end +# still works. + +.*: file format elf64-mmix + +SYMBOL TABLE: +0+0 l d \.text 0+ +2000000000000000 l d \.data 0+ +2000000000000000 l d \.sbss 0+ +2000000000000000 l d \.bss 0+ +0+100 l d \.MMIX\.reg_contents 0+ +0+ l d \*ABS\* 0+ +0+ l d \*ABS\* 0+ +0+ l d \*ABS\* 0+ +0+20 l \*REG\* 0+ P +0+21 l \*REG\* 0+ O +0+22 l \*REG\* 0+ N +0+23 l \*REG\* 0+ M +0+24 l \*REG\* 0+ L +0+25 l \*REG\* 0+ K +0+26 l \*REG\* 0+ J +0+27 l \*REG\* 0+ I +0+28 l \*REG\* 0+ H +0+29 l \*REG\* 0+ G +0+2a l \*REG\* 0+ F +0+2b l \*REG\* 0+ E +0+2c l \*REG\* 0+ D +0+2d l \*REG\* 0+ C +0+2e l \*REG\* 0+ B +0+2f l \*REG\* 0+ A +0+30 l \*REG\* 0+ P +0+31 l \*REG\* 0+ O +0+32 l \*REG\* 0+ N +0+33 l \*REG\* 0+ M +0+34 l \*REG\* 0+ L +0+35 l \*REG\* 0+ K +0+36 l \*REG\* 0+ J +0+37 l \*REG\* 0+ I +0+38 l \*REG\* 0+ H +0+39 l \*REG\* 0+ G +0+3a l \*REG\* 0+ F +0+3b l \*REG\* 0+ E +0+3c l \*REG\* 0+ D +0+3d l \*REG\* 0+ C +0+3e l \*REG\* 0+ B +0+3f l \*REG\* 0+ A +0+40 l \*REG\* 0+ P +0+41 l \*REG\* 0+ O +0+42 l \*REG\* 0+ N +0+43 l \*REG\* 0+ M +0+44 l \*REG\* 0+ L +0+45 l \*REG\* 0+ K +0+46 l \*REG\* 0+ J +0+47 l \*REG\* 0+ I +0+48 l \*REG\* 0+ H +0+49 l \*REG\* 0+ G +0+4a l \*REG\* 0+ F +0+4b l \*REG\* 0+ E +0+4c l \*REG\* 0+ D +0+4d l \*REG\* 0+ C +0+4e l \*REG\* 0+ B +0+4f l \*REG\* 0+ A +0+50 l \*REG\* 0+ P +0+51 l \*REG\* 0+ O +0+52 l \*REG\* 0+ N +0+53 l \*REG\* 0+ M +0+54 l \*REG\* 0+ L +0+55 l \*REG\* 0+ K +0+56 l \*REG\* 0+ J +0+57 l \*REG\* 0+ I +0+58 l \*REG\* 0+ H +0+59 l \*REG\* 0+ G +0+5a l \*REG\* 0+ F +0+5b l \*REG\* 0+ E +0+5c l \*REG\* 0+ D +0+5d l \*REG\* 0+ C +0+5e l \*REG\* 0+ B +0+5f l \*REG\* 0+ A +0+60 l \*REG\* 0+ P +0+61 l \*REG\* 0+ O +0+62 l \*REG\* 0+ N +0+63 l \*REG\* 0+ M +0+64 l \*REG\* 0+ L +0+65 l \*REG\* 0+ K +0+66 l \*REG\* 0+ J +0+67 l \*REG\* 0+ I +0+68 l \*REG\* 0+ H +0+69 l \*REG\* 0+ G +0+6a l \*REG\* 0+ F +0+6b l \*REG\* 0+ E +0+6c l \*REG\* 0+ D +0+6d l \*REG\* 0+ C +0+6e l \*REG\* 0+ B +0+6f l \*REG\* 0+ A +0+70 l \*REG\* 0+ P +0+71 l \*REG\* 0+ O +0+72 l \*REG\* 0+ N +0+73 l \*REG\* 0+ M +0+74 l \*REG\* 0+ L +0+75 l \*REG\* 0+ K +0+76 l \*REG\* 0+ J +0+77 l \*REG\* 0+ I +0+78 l \*REG\* 0+ H +0+79 l \*REG\* 0+ G +0+7a l \*REG\* 0+ F +0+7b l \*REG\* 0+ E +0+7c l \*REG\* 0+ D +0+7d l \*REG\* 0+ C +0+7e l \*REG\* 0+ B +0+7f l \*REG\* 0+ A +0+80 l \*REG\* 0+ P +0+81 l \*REG\* 0+ O +0+82 l \*REG\* 0+ N +0+83 l \*REG\* 0+ M +0+84 l \*REG\* 0+ L +0+85 l \*REG\* 0+ K +0+86 l \*REG\* 0+ J +0+87 l \*REG\* 0+ I +0+88 l \*REG\* 0+ H +0+89 l \*REG\* 0+ G +0+8a l \*REG\* 0+ F +0+8b l \*REG\* 0+ E +0+8c l \*REG\* 0+ D +0+8d l \*REG\* 0+ C +0+8e l \*REG\* 0+ B +0+8f l \*REG\* 0+ A +0+90 l \*REG\* 0+ P +0+91 l \*REG\* 0+ O +0+92 l \*REG\* 0+ N +0+93 l \*REG\* 0+ M +0+94 l \*REG\* 0+ L +0+95 l \*REG\* 0+ K +0+96 l \*REG\* 0+ J +0+97 l \*REG\* 0+ I +0+98 l \*REG\* 0+ H +0+99 l \*REG\* 0+ G +0+9a l \*REG\* 0+ F +0+9b l \*REG\* 0+ E +0+9c l \*REG\* 0+ D +0+9d l \*REG\* 0+ C +0+9e l \*REG\* 0+ B +0+9f l \*REG\* 0+ A +0+a0 l \*REG\* 0+ P +0+a1 l \*REG\* 0+ O +0+a2 l \*REG\* 0+ N +0+a3 l \*REG\* 0+ M +0+a4 l \*REG\* 0+ L +0+a5 l \*REG\* 0+ K +0+a6 l \*REG\* 0+ J +0+a7 l \*REG\* 0+ I +0+a8 l \*REG\* 0+ H +0+a9 l \*REG\* 0+ G +0+aa l \*REG\* 0+ F +0+ab l \*REG\* 0+ E +0+ac l \*REG\* 0+ D +0+ad l \*REG\* 0+ C +0+ae l \*REG\* 0+ B +0+af l \*REG\* 0+ A +0+b0 l \*REG\* 0+ P +0+b1 l \*REG\* 0+ O +0+b2 l \*REG\* 0+ N +0+b3 l \*REG\* 0+ M +0+b4 l \*REG\* 0+ L +0+b5 l \*REG\* 0+ K +0+b6 l \*REG\* 0+ J +0+b7 l \*REG\* 0+ I +0+b8 l \*REG\* 0+ H +0+b9 l \*REG\* 0+ G +0+ba l \*REG\* 0+ F +0+bb l \*REG\* 0+ E +0+bc l \*REG\* 0+ D +0+bd l \*REG\* 0+ C +0+be l \*REG\* 0+ B +0+bf l \*REG\* 0+ A +0+c0 l \*REG\* 0+ P +0+c1 l \*REG\* 0+ O +0+c2 l \*REG\* 0+ N +0+c3 l \*REG\* 0+ M +0+c4 l \*REG\* 0+ L +0+c5 l \*REG\* 0+ K +0+c6 l \*REG\* 0+ J +0+c7 l \*REG\* 0+ I +0+c8 l \*REG\* 0+ H +0+c9 l \*REG\* 0+ G +0+ca l \*REG\* 0+ F +0+cb l \*REG\* 0+ E +0+cc l \*REG\* 0+ D +0+cd l \*REG\* 0+ C +0+ce l \*REG\* 0+ B +0+cf l \*REG\* 0+ A +0+d0 l \*REG\* 0+ P +0+d1 l \*REG\* 0+ O +0+d2 l \*REG\* 0+ N +0+d3 l \*REG\* 0+ M +0+d4 l \*REG\* 0+ L +0+d5 l \*REG\* 0+ K +0+d6 l \*REG\* 0+ J +0+d7 l \*REG\* 0+ I +0+d8 l \*REG\* 0+ H +0+d9 l \*REG\* 0+ G +0+da l \*REG\* 0+ F +0+db l \*REG\* 0+ E +0+dc l \*REG\* 0+ D +0+dd l \*REG\* 0+ C +0+de l \*REG\* 0+ B +0+df l \*REG\* 0+ A +0+e0 l \*REG\* 0+ P +0+e1 l \*REG\* 0+ O +0+e2 l \*REG\* 0+ N +0+e3 l \*REG\* 0+ M +0+e4 l \*REG\* 0+ L +0+e5 l \*REG\* 0+ K +0+e6 l \*REG\* 0+ J +0+e7 l \*REG\* 0+ I +0+e8 l \*REG\* 0+ H +0+e9 l \*REG\* 0+ G +0+ea l \*REG\* 0+ F +0+eb l \*REG\* 0+ E +0+ec l \*REG\* 0+ D +0+ed l \*REG\* 0+ C +0+ee l \*REG\* 0+ B +0+ef l \*REG\* 0+ A +0+f0 l \*REG\* 0+ lsym +0+f1 l \*REG\* 0+ lsym +0+f2 l \*REG\* 0+ lsym +0+f3 l \*REG\* 0+ lsym +0+f4 l \*REG\* 0+ lsym +0+f5 l \*REG\* 0+ lsym +0+f6 l \*REG\* 0+ lsym +0+f7 l \*REG\* 0+ lsym +0+f8 l \*REG\* 0+ lsym +0+f9 l \*REG\* 0+ lsym +0+fa l \*REG\* 0+ lsym +0+fb l \*REG\* 0+ lsym +0+fc l \*REG\* 0+ lsym +0+fd l \*REG\* 0+ lsym +0+14 g \.text 0+ _start +0+fe g \*REG\* 0+ areg +2000000000000000 g O \*ABS\* 0+ __bss_start +2000000000000000 g O \*ABS\* 0+ _edata +2000000000000000 g O \*ABS\* 0+ _end +0+14 g O \.text 0+ _start\. +0+10 g \.text 0+ a + +Disassembly of section \.text: + +0+ <a-0x10>: + 0: e3fe0010 setl \$254,0x10 + 4: e6fe0000 incml \$254,0x0 + 8: e5fe0000 incmh \$254,0x0 + c: e4fe0000 inch \$254,0x0 + +0+10 <a>: + 10: e3fd0004 setl \$253,0x4 + +0+14 <_start>: + 14: e3fd0001 setl \$253,0x1 diff --git a/ld/testsuite/ld-mmix/greg-7.d b/ld/testsuite/ld-mmix/greg-7.d new file mode 100644 index 0000000..ea7f152 --- /dev/null +++ b/ld/testsuite/ld-mmix/greg-7.d @@ -0,0 +1,292 @@ +#source: gregget1.s +#source: greg-1.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: a.s +#source: start.s +#as: -x +#ld: -m elf64mmix +#objdump: -dt + +# Allocating the maximum number of gregs and referring to one at the +# *other* end still works. + +.*: file format elf64-mmix + +SYMBOL TABLE: +0+ l d \.text 0+ +2000000000000000 l d \.data 0+ +2000000000000000 l d \.sbss 0+ +2000000000000000 l d \.bss 0+ +0+100 l d \.MMIX\.reg_contents 0+ +0+ l d \*ABS\* 0+ +0+ l d \*ABS\* 0+ +0+ l d \*ABS\* 0+ +0+21 l \*REG\* 0+ P +0+22 l \*REG\* 0+ O +0+23 l \*REG\* 0+ N +0+24 l \*REG\* 0+ M +0+25 l \*REG\* 0+ L +0+26 l \*REG\* 0+ K +0+27 l \*REG\* 0+ J +0+28 l \*REG\* 0+ I +0+29 l \*REG\* 0+ H +0+2a l \*REG\* 0+ G +0+2b l \*REG\* 0+ F +0+2c l \*REG\* 0+ E +0+2d l \*REG\* 0+ D +0+2e l \*REG\* 0+ C +0+2f l \*REG\* 0+ B +0+30 l \*REG\* 0+ A +0+31 l \*REG\* 0+ P +0+32 l \*REG\* 0+ O +0+33 l \*REG\* 0+ N +0+34 l \*REG\* 0+ M +0+35 l \*REG\* 0+ L +0+36 l \*REG\* 0+ K +0+37 l \*REG\* 0+ J +0+38 l \*REG\* 0+ I +0+39 l \*REG\* 0+ H +0+3a l \*REG\* 0+ G +0+3b l \*REG\* 0+ F +0+3c l \*REG\* 0+ E +0+3d l \*REG\* 0+ D +0+3e l \*REG\* 0+ C +0+3f l \*REG\* 0+ B +0+40 l \*REG\* 0+ A +0+41 l \*REG\* 0+ P +0+42 l \*REG\* 0+ O +0+43 l \*REG\* 0+ N +0+44 l \*REG\* 0+ M +0+45 l \*REG\* 0+ L +0+46 l \*REG\* 0+ K +0+47 l \*REG\* 0+ J +0+48 l \*REG\* 0+ I +0+49 l \*REG\* 0+ H +0+4a l \*REG\* 0+ G +0+4b l \*REG\* 0+ F +0+4c l \*REG\* 0+ E +0+4d l \*REG\* 0+ D +0+4e l \*REG\* 0+ C +0+4f l \*REG\* 0+ B +0+50 l \*REG\* 0+ A +0+51 l \*REG\* 0+ P +0+52 l \*REG\* 0+ O +0+53 l \*REG\* 0+ N +0+54 l \*REG\* 0+ M +0+55 l \*REG\* 0+ L +0+56 l \*REG\* 0+ K +0+57 l \*REG\* 0+ J +0+58 l \*REG\* 0+ I +0+59 l \*REG\* 0+ H +0+5a l \*REG\* 0+ G +0+5b l \*REG\* 0+ F +0+5c l \*REG\* 0+ E +0+5d l \*REG\* 0+ D +0+5e l \*REG\* 0+ C +0+5f l \*REG\* 0+ B +0+60 l \*REG\* 0+ A +0+61 l \*REG\* 0+ P +0+62 l \*REG\* 0+ O +0+63 l \*REG\* 0+ N +0+64 l \*REG\* 0+ M +0+65 l \*REG\* 0+ L +0+66 l \*REG\* 0+ K +0+67 l \*REG\* 0+ J +0+68 l \*REG\* 0+ I +0+69 l \*REG\* 0+ H +0+6a l \*REG\* 0+ G +0+6b l \*REG\* 0+ F +0+6c l \*REG\* 0+ E +0+6d l \*REG\* 0+ D +0+6e l \*REG\* 0+ C +0+6f l \*REG\* 0+ B +0+70 l \*REG\* 0+ A +0+71 l \*REG\* 0+ P +0+72 l \*REG\* 0+ O +0+73 l \*REG\* 0+ N +0+74 l \*REG\* 0+ M +0+75 l \*REG\* 0+ L +0+76 l \*REG\* 0+ K +0+77 l \*REG\* 0+ J +0+78 l \*REG\* 0+ I +0+79 l \*REG\* 0+ H +0+7a l \*REG\* 0+ G +0+7b l \*REG\* 0+ F +0+7c l \*REG\* 0+ E +0+7d l \*REG\* 0+ D +0+7e l \*REG\* 0+ C +0+7f l \*REG\* 0+ B +0+80 l \*REG\* 0+ A +0+81 l \*REG\* 0+ P +0+82 l \*REG\* 0+ O +0+83 l \*REG\* 0+ N +0+84 l \*REG\* 0+ M +0+85 l \*REG\* 0+ L +0+86 l \*REG\* 0+ K +0+87 l \*REG\* 0+ J +0+88 l \*REG\* 0+ I +0+89 l \*REG\* 0+ H +0+8a l \*REG\* 0+ G +0+8b l \*REG\* 0+ F +0+8c l \*REG\* 0+ E +0+8d l \*REG\* 0+ D +0+8e l \*REG\* 0+ C +0+8f l \*REG\* 0+ B +0+90 l \*REG\* 0+ A +0+91 l \*REG\* 0+ P +0+92 l \*REG\* 0+ O +0+93 l \*REG\* 0+ N +0+94 l \*REG\* 0+ M +0+95 l \*REG\* 0+ L +0+96 l \*REG\* 0+ K +0+97 l \*REG\* 0+ J +0+98 l \*REG\* 0+ I +0+99 l \*REG\* 0+ H +0+9a l \*REG\* 0+ G +0+9b l \*REG\* 0+ F +0+9c l \*REG\* 0+ E +0+9d l \*REG\* 0+ D +0+9e l \*REG\* 0+ C +0+9f l \*REG\* 0+ B +0+a0 l \*REG\* 0+ A +0+a1 l \*REG\* 0+ P +0+a2 l \*REG\* 0+ O +0+a3 l \*REG\* 0+ N +0+a4 l \*REG\* 0+ M +0+a5 l \*REG\* 0+ L +0+a6 l \*REG\* 0+ K +0+a7 l \*REG\* 0+ J +0+a8 l \*REG\* 0+ I +0+a9 l \*REG\* 0+ H +0+aa l \*REG\* 0+ G +0+ab l \*REG\* 0+ F +0+ac l \*REG\* 0+ E +0+ad l \*REG\* 0+ D +0+ae l \*REG\* 0+ C +0+af l \*REG\* 0+ B +0+b0 l \*REG\* 0+ A +0+b1 l \*REG\* 0+ P +0+b2 l \*REG\* 0+ O +0+b3 l \*REG\* 0+ N +0+b4 l \*REG\* 0+ M +0+b5 l \*REG\* 0+ L +0+b6 l \*REG\* 0+ K +0+b7 l \*REG\* 0+ J +0+b8 l \*REG\* 0+ I +0+b9 l \*REG\* 0+ H +0+ba l \*REG\* 0+ G +0+bb l \*REG\* 0+ F +0+bc l \*REG\* 0+ E +0+bd l \*REG\* 0+ D +0+be l \*REG\* 0+ C +0+bf l \*REG\* 0+ B +0+c0 l \*REG\* 0+ A +0+c1 l \*REG\* 0+ P +0+c2 l \*REG\* 0+ O +0+c3 l \*REG\* 0+ N +0+c4 l \*REG\* 0+ M +0+c5 l \*REG\* 0+ L +0+c6 l \*REG\* 0+ K +0+c7 l \*REG\* 0+ J +0+c8 l \*REG\* 0+ I +0+c9 l \*REG\* 0+ H +0+ca l \*REG\* 0+ G +0+cb l \*REG\* 0+ F +0+cc l \*REG\* 0+ E +0+cd l \*REG\* 0+ D +0+ce l \*REG\* 0+ C +0+cf l \*REG\* 0+ B +0+d0 l \*REG\* 0+ A +0+d1 l \*REG\* 0+ P +0+d2 l \*REG\* 0+ O +0+d3 l \*REG\* 0+ N +0+d4 l \*REG\* 0+ M +0+d5 l \*REG\* 0+ L +0+d6 l \*REG\* 0+ K +0+d7 l \*REG\* 0+ J +0+d8 l \*REG\* 0+ I +0+d9 l \*REG\* 0+ H +0+da l \*REG\* 0+ G +0+db l \*REG\* 0+ F +0+dc l \*REG\* 0+ E +0+dd l \*REG\* 0+ D +0+de l \*REG\* 0+ C +0+df l \*REG\* 0+ B +0+e0 l \*REG\* 0+ A +0+e1 l \*REG\* 0+ P +0+e2 l \*REG\* 0+ O +0+e3 l \*REG\* 0+ N +0+e4 l \*REG\* 0+ M +0+e5 l \*REG\* 0+ L +0+e6 l \*REG\* 0+ K +0+e7 l \*REG\* 0+ J +0+e8 l \*REG\* 0+ I +0+e9 l \*REG\* 0+ H +0+ea l \*REG\* 0+ G +0+eb l \*REG\* 0+ F +0+ec l \*REG\* 0+ E +0+ed l \*REG\* 0+ D +0+ee l \*REG\* 0+ C +0+ef l \*REG\* 0+ B +0+f0 l \*REG\* 0+ A +0+f1 l \*REG\* 0+ lsym +0+f2 l \*REG\* 0+ lsym +0+f3 l \*REG\* 0+ lsym +0+f4 l \*REG\* 0+ lsym +0+f5 l \*REG\* 0+ lsym +0+f6 l \*REG\* 0+ lsym +0+f7 l \*REG\* 0+ lsym +0+f8 l \*REG\* 0+ lsym +0+f9 l \*REG\* 0+ lsym +0+fa l \*REG\* 0+ lsym +0+fb l \*REG\* 0+ lsym +0+fc l \*REG\* 0+ lsym +0+fd l \*REG\* 0+ lsym +0+fe l \*REG\* 0+ lsym +0+14 g \.text 0+ _start +0+20 g \*REG\* 0+ areg +2000000000000000 g O \*ABS\* 0+ __bss_start +2000000000000000 g O \*ABS\* 0+ _edata +2000000000000000 g O \*ABS\* 0+ _end +0+14 g O \.text 0+ _start\. +0+10 g \.text 0+ a + +Disassembly of section \.text: + +0+ <a-0x10>: + 0: e3200010 setl \$32,0x10 + 4: e6200000 incml \$32,0x0 + 8: e5200000 incmh \$32,0x0 + c: e4200000 inch \$32,0x0 + +0+10 <a>: + 10: e3fd0004 setl \$253,0x4 + +0+14 <_start>: + 14: e3fd0001 setl \$253,0x1 diff --git a/ld/testsuite/ld-mmix/greg-8.d b/ld/testsuite/ld-mmix/greg-8.d new file mode 100644 index 0000000..cb6b776 --- /dev/null +++ b/ld/testsuite/ld-mmix/greg-8.d @@ -0,0 +1,37 @@ +#source: gregget1.s +#source: greg-1.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: a.s +#source: start.s +#as: -x +#ld: -m elf64mmix +#error: Too many global registers: 224, max 223 + +# Allocating the maximum number of gregs *plus one* is an error. diff --git a/ld/testsuite/ld-mmix/greg-9.d b/ld/testsuite/ld-mmix/greg-9.d new file mode 100644 index 0000000..c9d9fcd --- /dev/null +++ b/ld/testsuite/ld-mmix/greg-9.d @@ -0,0 +1,39 @@ +#source: gregget1.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-1.s +#source: a.s +#source: start.s +#as: -x +#ld: -m elf64mmix +#objdump: -dt +#error: Too many global registers: 224, max 223 + +# Allocating the maximum number of gregs *plus one* is an error; other end +# of the stick. diff --git a/ld/testsuite/ld-mmix/gregbza1.s b/ld/testsuite/ld-mmix/gregbza1.s new file mode 100644 index 0000000..878c66f --- /dev/null +++ b/ld/testsuite/ld-mmix/gregbza1.s @@ -0,0 +1,4 @@ +# Use a symbolic register areg, presumably allocated by greg in another file. +# The "BZ" will be expanded, and the reloc for areg must be resolved +# before the other relocs for that insn. + BZ areg,a diff --git a/ld/testsuite/ld-mmix/gregget1.s b/ld/testsuite/ld-mmix/gregget1.s new file mode 100644 index 0000000..49f97f0 --- /dev/null +++ b/ld/testsuite/ld-mmix/gregget1.s @@ -0,0 +1,4 @@ +# Use a symbolic register areg, presumably allocated by greg in another file. +# The "GETA" will be expanded, and the reloc for areg must be resolved +# before the other relocs for that insn. + GETA areg,a diff --git a/ld/testsuite/ld-mmix/gregget2.s b/ld/testsuite/ld-mmix/gregget2.s new file mode 100644 index 0000000..855136c --- /dev/null +++ b/ld/testsuite/ld-mmix/gregget2.s @@ -0,0 +1,4 @@ +# Use a symbolic register b, presumably allocated by greg in another file. +# The "GETA" will be expanded, and the reloc for b must be resolved before +# the other relocs for that insn. + GETA b,a diff --git a/ld/testsuite/ld-mmix/gregldo1.s b/ld/testsuite/ld-mmix/gregldo1.s new file mode 100644 index 0000000..3ea71e7 --- /dev/null +++ b/ld/testsuite/ld-mmix/gregldo1.s @@ -0,0 +1,6 @@ +# Use a symbolic register areg, presumably allocated by greg in another file. + LDO $12,$32,areg + LDO $123,areg,34 + LDO areg,$234,56 + + diff --git a/ld/testsuite/ld-mmix/gregpsj1.s b/ld/testsuite/ld-mmix/gregpsj1.s new file mode 100644 index 0000000..87b68a3 --- /dev/null +++ b/ld/testsuite/ld-mmix/gregpsj1.s @@ -0,0 +1,4 @@ +# Use a symbolic register areg, presumably allocated by greg in another file. +# The "PUSHJ" will be expanded, and the reloc for areg must be resolved +# before the other relocs for that insn. + PUSHJ areg,a diff --git a/ld/testsuite/ld-mmix/hdr-1.d b/ld/testsuite/ld-mmix/hdr-1.d new file mode 100644 index 0000000..3cb8265 --- /dev/null +++ b/ld/testsuite/ld-mmix/hdr-1.d @@ -0,0 +1,19 @@ +#source: start.s +#source: a.s +#ld: -T $srcdir/$subdir/mmohdr1.ld +#objdump: -sht + +.*: file format mmo + +Sections: +Idx Name Size VMA LMA File off Algn + 0 \.text 0+8 0+100 0+100 0+ 2\*\*2 + CONTENTS, ALLOC, LOAD, CODE +SYMBOL TABLE: +0+100 g \.text Main +0+100 g \.text _start +0+104 g \.text a + + +Contents of section \.text: + 0100 e3fd0001 e3fd0004 .* diff --git a/ld/testsuite/ld-mmix/jumpa-1b.d b/ld/testsuite/ld-mmix/jumpa-1b.d new file mode 100644 index 0000000..3baff9b --- /dev/null +++ b/ld/testsuite/ld-mmix/jumpa-1b.d @@ -0,0 +1,25 @@ +#source: start.s +#source: a.s +#source: jumpa.s +#as: -x +#ld: -m elf64mmix +#objdump: -dr + +.*: file format elf64-mmix + +Disassembly of section \.text: + +0+ <_start>: + 0: e3fd0001 setl \$253,0x1 + +0+4 <a>: + 4: e3fd0004 setl \$253,0x4 + +0+8 <jumpa>: + 8: e3fd0002 setl \$253,0x2 + c: f1fffffe jmp 4 <a> + 10: fd000000 swym 0,0,0 + 14: fd000000 swym 0,0,0 + 18: fd000000 swym 0,0,0 + 1c: fd000000 swym 0,0,0 + 20: e3fd0003 setl \$253,0x3 diff --git a/ld/testsuite/ld-mmix/jumpa-1f.d b/ld/testsuite/ld-mmix/jumpa-1f.d new file mode 100644 index 0000000..983d294 --- /dev/null +++ b/ld/testsuite/ld-mmix/jumpa-1f.d @@ -0,0 +1,25 @@ +#source: start.s +#source: jumpa.s +#source: a.s +#as: -x +#ld: -m elf64mmix +#objdump: -dr + +.*: file format elf64-mmix + +Disassembly of section \.text: + +0+ <_start>: + 0: e3fd0001 setl \$253,0x1 + +0+4 <jumpa>: + 4: e3fd0002 setl \$253,0x2 + 8: f0000006 jmp 20 <a> + c: fd000000 swym 0,0,0 + 10: fd000000 swym 0,0,0 + 14: fd000000 swym 0,0,0 + 18: fd000000 swym 0,0,0 + 1c: e3fd0003 setl \$253,0x3 + +0+20 <a>: + 20: e3fd0004 setl \$253,0x4 diff --git a/ld/testsuite/ld-mmix/jumpa-2b.d b/ld/testsuite/ld-mmix/jumpa-2b.d new file mode 100644 index 0000000..f594055 --- /dev/null +++ b/ld/testsuite/ld-mmix/jumpa-2b.d @@ -0,0 +1,21 @@ +#source: start.s +#source: a.s +#source: jumpa.s +#as: -no-expand +#ld: -m elf64mmix +#objdump: -dr + +.*: file format elf64-mmix + +Disassembly of section \.text: + +0+ <_start>: + 0: e3fd0001 setl \$253,0x1 + +0+4 <a>: + 4: e3fd0004 setl \$253,0x4 + +0+8 <jumpa>: + 8: e3fd0002 setl \$253,0x2 + c: f1fffffe jmp 4 <a> + 10: e3fd0003 setl \$253,0x3 diff --git a/ld/testsuite/ld-mmix/jumpa-2f.d b/ld/testsuite/ld-mmix/jumpa-2f.d new file mode 100644 index 0000000..a923e21 --- /dev/null +++ b/ld/testsuite/ld-mmix/jumpa-2f.d @@ -0,0 +1,21 @@ +#source: start.s +#source: jumpa.s +#source: a.s +#as: -no-expand +#ld: -m elf64mmix +#objdump: -dr + +.*: file format elf64-mmix + +Disassembly of section \.text: + +0+ <_start>: + 0: e3fd0001 setl \$253,0x1 + +0+4 <jumpa>: + 4: e3fd0002 setl \$253,0x2 + 8: f0000002 jmp 10 <a> + c: e3fd0003 setl \$253,0x3 + +0+10 <a>: + 10: e3fd0004 setl \$253,0x4 diff --git a/ld/testsuite/ld-mmix/jumpa-3b.d b/ld/testsuite/ld-mmix/jumpa-3b.d new file mode 100644 index 0000000..d2f1b50 --- /dev/null +++ b/ld/testsuite/ld-mmix/jumpa-3b.d @@ -0,0 +1,30 @@ +#source: start.s +#source: a.s +#source: pad2p26m32.s +#source: pad16.s +#source: pad4.s +#source: pad4.s +#source: jumpa.s +#as: -x +#ld: -m elf64mmix +#objdump: -dr + +.*: file format elf64-mmix + +Disassembly of section \.text: + +0+ <_start>: + 0: e3fd0001 setl \$253,0x1 + +0+4 <a>: + 4: e3fd0004 setl \$253,0x4 + \.\.\. + +0+4000000 <jumpa>: + 4000000: e3fd0002 setl \$253,0x2 + 4000004: f1000000 jmp 4 <a> + 4000008: fd000000 swym 0,0,0 + 400000c: fd000000 swym 0,0,0 + 4000010: fd000000 swym 0,0,0 + 4000014: fd000000 swym 0,0,0 + 4000018: e3fd0003 setl \$253,0x3 diff --git a/ld/testsuite/ld-mmix/jumpa-3f.d b/ld/testsuite/ld-mmix/jumpa-3f.d new file mode 100644 index 0000000..4a5e10d --- /dev/null +++ b/ld/testsuite/ld-mmix/jumpa-3f.d @@ -0,0 +1,28 @@ +#source: start.s +#source: jumpa.s +#source: pad2p26m32.s +#source: pad4.s +#source: a.s +#as: -x +#ld: -m elf64mmix +#objdump: -dr + +.*: file format elf64-mmix + +Disassembly of section \.text: + +0+ <_start>: + 0: e3fd0001 setl \$253,0x1 + +0+4 <jumpa>: + 4: e3fd0002 setl \$253,0x2 + 8: f0ffffff jmp 4000004 <a> + c: fd000000 swym 0,0,0 + 10: fd000000 swym 0,0,0 + 14: fd000000 swym 0,0,0 + 18: fd000000 swym 0,0,0 + 1c: e3fd0003 setl \$253,0x3 + \.\.\. + +0+4000004 <a>: + 4000004: e3fd0004 setl \$253,0x4 diff --git a/ld/testsuite/ld-mmix/jumpa-4b.d b/ld/testsuite/ld-mmix/jumpa-4b.d new file mode 100644 index 0000000..9d35932 --- /dev/null +++ b/ld/testsuite/ld-mmix/jumpa-4b.d @@ -0,0 +1,26 @@ +#source: start.s +#source: a.s +#source: pad2p26m32.s +#source: pad16.s +#source: pad4.s +#source: pad4.s +#source: jumpa.s +#as: -no-expand +#ld: -m elf64mmix +#objdump: -dr + +.*: file format elf64-mmix + +Disassembly of section \.text: + +0+ <_start>: + 0: e3fd0001 setl \$253,0x1 + +0+4 <a>: + 4: e3fd0004 setl \$253,0x4 + \.\.\. + +0+4000000 <jumpa>: + 4000000: e3fd0002 setl \$253,0x2 + 4000004: f1000000 jmp 4 <a> + 4000008: e3fd0003 setl \$253,0x3 diff --git a/ld/testsuite/ld-mmix/jumpa-4f.d b/ld/testsuite/ld-mmix/jumpa-4f.d new file mode 100644 index 0000000..3c0885b --- /dev/null +++ b/ld/testsuite/ld-mmix/jumpa-4f.d @@ -0,0 +1,25 @@ +#source: start.s +#source: jumpa.s +#source: pad2p26m32.s +#source: pad16.s +#source: pad4.s +#source: a.s +#as: -no-expand +#ld: -m elf64mmix +#objdump: -dr + +.*: file format elf64-mmix + +Disassembly of section \.text: + +0+ <_start>: + 0: e3fd0001 setl \$253,0x1 + +0+4 <jumpa>: + 4: e3fd0002 setl \$253,0x2 + 8: f0ffffff jmp 4000004 <a> + c: e3fd0003 setl \$253,0x3 + \.\.\. + +0+4000004 <a>: + 4000004: e3fd0004 setl \$253,0x4 diff --git a/ld/testsuite/ld-mmix/jumpa-5b.d b/ld/testsuite/ld-mmix/jumpa-5b.d new file mode 100644 index 0000000..b2fcaf4 --- /dev/null +++ b/ld/testsuite/ld-mmix/jumpa-5b.d @@ -0,0 +1,31 @@ +#source: start.s +#source: a.s +#source: pad2p26m32.s +#source: pad16.s +#source: pad4.s +#source: pad4.s +#source: pad4.s +#source: jumpa.s +#as: -x +#ld: -m elf64mmix +#objdump: -dr + +.*: file format elf64-mmix + +Disassembly of section \.text: + +0+ <_start>: + 0: e3fd0001 setl \$253,0x1 + +0+4 <a>: + 4: e3fd0004 setl \$253,0x4 + \.\.\. + +0+4000004 <jumpa>: + 4000004: e3fd0002 setl \$253,0x2 + 4000008: e3ff0004 setl \$255,0x4 + 400000c: e6ff0000 incml \$255,0x0 + 4000010: e5ff0000 incmh \$255,0x0 + 4000014: e4ff0000 inch \$255,0x0 + 4000018: 9fffff00 go \$255,\$255,0 + 400001c: e3fd0003 setl \$253,0x3 diff --git a/ld/testsuite/ld-mmix/jumpa-5f.d b/ld/testsuite/ld-mmix/jumpa-5f.d new file mode 100644 index 0000000..bb91e70 --- /dev/null +++ b/ld/testsuite/ld-mmix/jumpa-5f.d @@ -0,0 +1,29 @@ +#source: start.s +#source: jumpa.s +#source: pad2p26m32.s +#source: pad4.s +#source: pad4.s +#source: a.s +#as: -x +#ld: -m elf64mmix +#objdump: -dr + +.*: file format elf64-mmix + +Disassembly of section \.text: + +0+ <_start>: + 0: e3fd0001 setl \$253,0x1 + +0+4 <jumpa>: + 4: e3fd0002 setl \$253,0x2 + 8: e3ff0008 setl \$255,0x8 + c: e6ff0400 incml \$255,0x400 + 10: e5ff0000 incmh \$255,0x0 + 14: e4ff0000 inch \$255,0x0 + 18: 9fffff00 go \$255,\$255,0 + 1c: e3fd0003 setl \$253,0x3 + \.\.\. + +0+4000008 <a>: + 4000008: e3fd0004 setl \$253,0x4 diff --git a/ld/testsuite/ld-mmix/jumpa-6b.d b/ld/testsuite/ld-mmix/jumpa-6b.d new file mode 100644 index 0000000..e6e6401 --- /dev/null +++ b/ld/testsuite/ld-mmix/jumpa-6b.d @@ -0,0 +1,11 @@ +#source: start.s +#source: a.s +#source: pad2p26m32.s +#source: pad16.s +#source: pad4.s +#source: pad4.s +#source: pad4.s +#source: jumpa.s +#as: -no-expand +#ld: -m elf64mmix +#error: relocation truncated to fit: R_MMIX_ADDR27 a$ diff --git a/ld/testsuite/ld-mmix/jumpa-6f.d b/ld/testsuite/ld-mmix/jumpa-6f.d new file mode 100644 index 0000000..926efbe --- /dev/null +++ b/ld/testsuite/ld-mmix/jumpa-6f.d @@ -0,0 +1,10 @@ +#source: start.s +#source: jumpa.s +#source: pad2p26m32.s +#source: pad16.s +#source: pad4.s +#source: pad4.s +#source: a.s +#as: -no-expand +#ld: -m elf64mmix +#error: relocation truncated to fit: R_MMIX_ADDR27 a$ diff --git a/ld/testsuite/ld-mmix/jumpa-7b.d b/ld/testsuite/ld-mmix/jumpa-7b.d new file mode 100644 index 0000000..202d006 --- /dev/null +++ b/ld/testsuite/ld-mmix/jumpa-7b.d @@ -0,0 +1,25 @@ +#source: start.s +#source: a.s +#source: jumpa.s +#as: -x +#ld: -m mmo +#objdump: -dr + +.*: file format mmo + +Disassembly of section \.text: + +0+ <(Main|_start)>: + 0: e3fd0001 setl \$253,0x1 + +0+4 <a>: + 4: e3fd0004 setl \$253,0x4 + +0+8 <jumpa>: + 8: e3fd0002 setl \$253,0x2 + c: f1fffffe jmp 4 <a> + 10: fd000000 swym 0,0,0 + 14: fd000000 swym 0,0,0 + 18: fd000000 swym 0,0,0 + 1c: fd000000 swym 0,0,0 + 20: e3fd0003 setl \$253,0x3 diff --git a/ld/testsuite/ld-mmix/jumpa-7f.d b/ld/testsuite/ld-mmix/jumpa-7f.d new file mode 100644 index 0000000..b8345e1 --- /dev/null +++ b/ld/testsuite/ld-mmix/jumpa-7f.d @@ -0,0 +1,25 @@ +#source: start.s +#source: jumpa.s +#source: a.s +#as: -x +#ld: -m mmo +#objdump: -dr + +.*: file format mmo + +Disassembly of section \.text: + +0+ <(Main|_start)>: + 0: e3fd0001 setl \$253,0x1 + +0+4 <jumpa>: + 4: e3fd0002 setl \$253,0x2 + 8: f0000006 jmp 20 <a> + c: fd000000 swym 0,0,0 + 10: fd000000 swym 0,0,0 + 14: fd000000 swym 0,0,0 + 18: fd000000 swym 0,0,0 + 1c: e3fd0003 setl \$253,0x3 + +0+20 <a>: + 20: e3fd0004 setl \$253,0x4 diff --git a/ld/testsuite/ld-mmix/jumpa-8b.d b/ld/testsuite/ld-mmix/jumpa-8b.d new file mode 100644 index 0000000..456c949 --- /dev/null +++ b/ld/testsuite/ld-mmix/jumpa-8b.d @@ -0,0 +1,21 @@ +#source: start.s +#source: a.s +#source: jumpa.s +#as: -no-expand +#ld: -m mmo +#objdump: -dr + +.*: file format mmo + +Disassembly of section \.text: + +0+ <(Main|_start)>: + 0: e3fd0001 setl \$253,0x1 + +0+4 <a>: + 4: e3fd0004 setl \$253,0x4 + +0+8 <jumpa>: + 8: e3fd0002 setl \$253,0x2 + c: f1fffffe jmp 4 <a> + 10: e3fd0003 setl \$253,0x3 diff --git a/ld/testsuite/ld-mmix/jumpa-8f.d b/ld/testsuite/ld-mmix/jumpa-8f.d new file mode 100644 index 0000000..05777ce --- /dev/null +++ b/ld/testsuite/ld-mmix/jumpa-8f.d @@ -0,0 +1,21 @@ +#source: start.s +#source: jumpa.s +#source: a.s +#as: -no-expand +#ld: -m mmo +#objdump: -dr + +.*: file format mmo + +Disassembly of section \.text: + +0+ <(Main|_start)>: + 0: e3fd0001 setl \$253,0x1 + +0+4 <jumpa>: + 4: e3fd0002 setl \$253,0x2 + 8: f0000002 jmp 10 <a> + c: e3fd0003 setl \$253,0x3 + +0+10 <a>: + 10: e3fd0004 setl \$253,0x4 diff --git a/ld/testsuite/ld-mmix/jumpa-9b.d b/ld/testsuite/ld-mmix/jumpa-9b.d new file mode 100644 index 0000000..2a639d3 --- /dev/null +++ b/ld/testsuite/ld-mmix/jumpa-9b.d @@ -0,0 +1,30 @@ +#source: start.s +#source: a.s +#source: pad2p26m32.s +#source: pad16.s +#source: pad4.s +#source: pad4.s +#source: jumpa.s +#as: -x +#ld: -m mmo +#objdump: -dr + +.*: file format mmo + +Disassembly of section \.text: + +0+ <(Main|_start)>: + 0: e3fd0001 setl \$253,0x1 + +0+4 <a>: + 4: e3fd0004 setl \$253,0x4 + \.\.\. + +0+4000000 <jumpa>: + 4000000: e3fd0002 setl \$253,0x2 + 4000004: f1000000 jmp 4 <a> + 4000008: fd000000 swym 0,0,0 + 400000c: fd000000 swym 0,0,0 + 4000010: fd000000 swym 0,0,0 + 4000014: fd000000 swym 0,0,0 + 4000018: e3fd0003 setl \$253,0x3 diff --git a/ld/testsuite/ld-mmix/jumpa-9f.d b/ld/testsuite/ld-mmix/jumpa-9f.d new file mode 100644 index 0000000..a4a2932 --- /dev/null +++ b/ld/testsuite/ld-mmix/jumpa-9f.d @@ -0,0 +1,28 @@ +#source: start.s +#source: jumpa.s +#source: pad2p26m32.s +#source: pad4.s +#source: a.s +#as: -x +#ld: -m mmo +#objdump: -dr + +.*: file format mmo + +Disassembly of section \.text: + +0+ <(Main|_start)>: + 0: e3fd0001 setl \$253,0x1 + +0+4 <jumpa>: + 4: e3fd0002 setl \$253,0x2 + 8: f0ffffff jmp 4000004 <a> + c: fd000000 swym 0,0,0 + 10: fd000000 swym 0,0,0 + 14: fd000000 swym 0,0,0 + 18: fd000000 swym 0,0,0 + 1c: e3fd0003 setl \$253,0x3 + \.\.\. + +0+4000004 <a>: + 4000004: e3fd0004 setl \$253,0x4 diff --git a/ld/testsuite/ld-mmix/jumpa.s b/ld/testsuite/ld-mmix/jumpa.s new file mode 100644 index 0000000..16ba54b --- /dev/null +++ b/ld/testsuite/ld-mmix/jumpa.s @@ -0,0 +1,7 @@ +* Just jump to an external symbol, with some padding. + .text + .global jumpa +jumpa: + SET $253,2 + JMP a + SET $253,3 diff --git a/ld/testsuite/ld-mmix/jumpa12b.d b/ld/testsuite/ld-mmix/jumpa12b.d new file mode 100644 index 0000000..8efe690 --- /dev/null +++ b/ld/testsuite/ld-mmix/jumpa12b.d @@ -0,0 +1,26 @@ +#source: start.s +#source: a.s +#source: pad2p26m32.s +#source: pad16.s +#source: pad4.s +#source: pad4.s +#source: jumpa.s +#as: -no-expand +#ld: -m mmo +#objdump: -dr + +.*: file format mmo + +Disassembly of section \.text: + +0+ <(Main|_start)>: + 0: e3fd0001 setl \$253,0x1 + +0+4 <a>: + 4: e3fd0004 setl \$253,0x4 + \.\.\. + +0+4000000 <jumpa>: + 4000000: e3fd0002 setl \$253,0x2 + 4000004: f1000000 jmp 4 <a> + 4000008: e3fd0003 setl \$253,0x3 diff --git a/ld/testsuite/ld-mmix/jumpa12f.d b/ld/testsuite/ld-mmix/jumpa12f.d new file mode 100644 index 0000000..6e2968f --- /dev/null +++ b/ld/testsuite/ld-mmix/jumpa12f.d @@ -0,0 +1,25 @@ +#source: start.s +#source: jumpa.s +#source: pad2p26m32.s +#source: pad16.s +#source: pad4.s +#source: a.s +#as: -no-expand +#ld: -m mmo +#objdump: -dr + +.*: file format mmo + +Disassembly of section \.text: + +0+ <(Main|_start)>: + 0: e3fd0001 setl \$253,0x1 + +0+4 <jumpa>: + 4: e3fd0002 setl \$253,0x2 + 8: f0ffffff jmp 4000004 <a> + c: e3fd0003 setl \$253,0x3 + \.\.\. + +0+4000004 <a>: + 4000004: e3fd0004 setl \$253,0x4 diff --git a/ld/testsuite/ld-mmix/jumpa13b.d b/ld/testsuite/ld-mmix/jumpa13b.d new file mode 100644 index 0000000..bda81e3 --- /dev/null +++ b/ld/testsuite/ld-mmix/jumpa13b.d @@ -0,0 +1,31 @@ +#source: start.s +#source: a.s +#source: pad2p26m32.s +#source: pad16.s +#source: pad4.s +#source: pad4.s +#source: pad4.s +#source: jumpa.s +#as: -x +#ld: -m mmo +#objdump: -dr + +.*: file format mmo + +Disassembly of section \.text: + +0+ <(Main|_start)>: + 0: e3fd0001 setl \$253,0x1 + +0+4 <a>: + 4: e3fd0004 setl \$253,0x4 + \.\.\. + +0+4000004 <jumpa>: + 4000004: e3fd0002 setl \$253,0x2 + 4000008: e3ff0004 setl \$255,0x4 + 400000c: e6ff0000 incml \$255,0x0 + 4000010: e5ff0000 incmh \$255,0x0 + 4000014: e4ff0000 inch \$255,0x0 + 4000018: 9fffff00 go \$255,\$255,0 + 400001c: e3fd0003 setl \$253,0x3 diff --git a/ld/testsuite/ld-mmix/jumpa13f.d b/ld/testsuite/ld-mmix/jumpa13f.d new file mode 100644 index 0000000..335d7ab --- /dev/null +++ b/ld/testsuite/ld-mmix/jumpa13f.d @@ -0,0 +1,29 @@ +#source: start.s +#source: jumpa.s +#source: pad2p26m32.s +#source: pad4.s +#source: pad4.s +#source: a.s +#as: -x +#ld: -m mmo +#objdump: -dr + +.*: file format mmo + +Disassembly of section \.text: + +0+ <(Main|_start)>: + 0: e3fd0001 setl \$253,0x1 + +0+4 <jumpa>: + 4: e3fd0002 setl \$253,0x2 + 8: e3ff0008 setl \$255,0x8 + c: e6ff0400 incml \$255,0x400 + 10: e5ff0000 incmh \$255,0x0 + 14: e4ff0000 inch \$255,0x0 + 18: 9fffff00 go \$255,\$255,0 + 1c: e3fd0003 setl \$253,0x3 + \.\.\. + +0+4000008 <a>: + 4000008: e3fd0004 setl \$253,0x4 diff --git a/ld/testsuite/ld-mmix/jumpa14b.d b/ld/testsuite/ld-mmix/jumpa14b.d new file mode 100644 index 0000000..9cadb11 --- /dev/null +++ b/ld/testsuite/ld-mmix/jumpa14b.d @@ -0,0 +1,11 @@ +#source: start.s +#source: a.s +#source: pad2p26m32.s +#source: pad16.s +#source: pad4.s +#source: pad4.s +#source: pad4.s +#source: jumpa.s +#as: -no-expand +#ld: -m mmo +#error: relocation truncated to fit: R_MMIX_ADDR27 a$ diff --git a/ld/testsuite/ld-mmix/jumpa14f.d b/ld/testsuite/ld-mmix/jumpa14f.d new file mode 100644 index 0000000..b51b552 --- /dev/null +++ b/ld/testsuite/ld-mmix/jumpa14f.d @@ -0,0 +1,10 @@ +#source: start.s +#source: jumpa.s +#source: pad2p26m32.s +#source: pad16.s +#source: pad4.s +#source: pad4.s +#source: a.s +#as: -no-expand +#ld: -m mmo +#error: relocation truncated to fit: R_MMIX_ADDR27 a$ diff --git a/ld/testsuite/ld-mmix/loc1.d b/ld/testsuite/ld-mmix/loc1.d new file mode 100644 index 0000000..5168512 --- /dev/null +++ b/ld/testsuite/ld-mmix/loc1.d @@ -0,0 +1,28 @@ +#source: loc1.s +#ld: -e loc1 -m elf64mmix +#objdump: -str + +# Single text file. + +.*: file format elf64-mmix + +SYMBOL TABLE: +0+1000 l d \.text 0+ +2000000000000000 l d \.data 0+ +2000000000000000 l d \.sbss 0+ +2000000000000000 l d \.bss 0+ +0+ l d \*ABS\* 0+ +0+ l d \*ABS\* 0+ +0+ l d \*ABS\* 0+ +0+1000 g \.text 0+ loc1 +0+1000 g \*ABS\* 0+ __\.MMIX\.start\.\.text +2000000000000000 g O \*ABS\* 0+ __bss_start +2000000000000000 g O \*ABS\* 0+ _edata +2000000000000000 g O \*ABS\* 0+ _end +0+1000 g O \.text 0+ _start\. + + +Contents of section \.text: + 1000 fd030303 .* +Contents of section \.data: +Contents of section \.sbss: diff --git a/ld/testsuite/ld-mmix/loc1.s b/ld/testsuite/ld-mmix/loc1.s new file mode 100644 index 0000000..1898ae3 --- /dev/null +++ b/ld/testsuite/ld-mmix/loc1.s @@ -0,0 +1,4 @@ + LOC #1000 +loc1 SWYM 3,3,3 + .global loc1 + diff --git a/ld/testsuite/ld-mmix/loc1m.d b/ld/testsuite/ld-mmix/loc1m.d new file mode 100644 index 0000000..9721bcb --- /dev/null +++ b/ld/testsuite/ld-mmix/loc1m.d @@ -0,0 +1,14 @@ +#source: loc1.s +#ld: -m mmo -e loc1 +#objdump: -str + +# err: two locs. + +.*: file format mmo + +SYMBOL TABLE: +0+1000 g \.text Main +0+1000 g \.text loc1 + +Contents of section \.text: + 1000 fd030303 .* diff --git a/ld/testsuite/ld-mmix/loc2.d b/ld/testsuite/ld-mmix/loc2.d new file mode 100644 index 0000000..682fa28 --- /dev/null +++ b/ld/testsuite/ld-mmix/loc2.d @@ -0,0 +1,29 @@ +#source: loc1.s +#source: start.s +#ld: -m elf64mmix +#objdump: -str + +# Two text files. + +.*: file format elf64-mmix + +SYMBOL TABLE: +0+1000 l d \.text 0+ +2000000000000000 l d \.data 0+ +2000000000000000 l d \.sbss 0+ +2000000000000000 l d \.bss 0+ +0+ l d \*ABS\* 0+ +0+ l d \*ABS\* 0+ +0+ l d \*ABS\* 0+ +0+1004 g \.text 0+ _start +0+1000 g \.text 0+ loc1 +0+1000 g \*ABS\* 0+ __\.MMIX\.start\.\.text +2000000000000000 g O \*ABS\* 0+ __bss_start +2000000000000000 g O \*ABS\* 0+ _edata +2000000000000000 g O \*ABS\* 0+ _end +0+1004 g O \.text 0+ _start\. + +Contents of section \.text: + 1000 fd030303 e3fd0001 .* +Contents of section \.data: +Contents of section .sbss: diff --git a/ld/testsuite/ld-mmix/loc2.s b/ld/testsuite/ld-mmix/loc2.s new file mode 100644 index 0000000..fc3988e --- /dev/null +++ b/ld/testsuite/ld-mmix/loc2.s @@ -0,0 +1,4 @@ + LOC #2000 +loc2 SWYM 3,2,3 + .global loc2 + diff --git a/ld/testsuite/ld-mmix/loc2m.d b/ld/testsuite/ld-mmix/loc2m.d new file mode 100644 index 0000000..4d62b24 --- /dev/null +++ b/ld/testsuite/ld-mmix/loc2m.d @@ -0,0 +1,14 @@ +#source: loc1.s +#source: start.s +#ld: -m mmo +#objdump: -str + +.*: file format mmo + +SYMBOL TABLE: +0+1004 g \.text Main +0+1004 g \.text _start +0+1000 g \.text loc1 + +Contents of section \.text: + 1000 fd030303 e3fd0001 .* diff --git a/ld/testsuite/ld-mmix/loc3.d b/ld/testsuite/ld-mmix/loc3.d new file mode 100644 index 0000000..78baf33 --- /dev/null +++ b/ld/testsuite/ld-mmix/loc3.d @@ -0,0 +1,29 @@ +#source: start.s +#source: loc1.s +#ld: -m elf64mmix +#objdump: -str + +# Two text files in opposite order. + +.*: file format elf64-mmix + +SYMBOL TABLE: +0+1000 l d \.text 0+ +2000000000000000 l d \.data 0+ +2000000000000000 l d \.sbss 0+ +2000000000000000 l d \.bss 0+ +0+ l d \*ABS\* 0+ +0+ l d \*ABS\* 0+ +0+ l d \*ABS\* 0+ +0+1000 g \.text 0+ _start +0+1004 g \.text 0+ loc1 +0+1000 g \*ABS\* 0+ __\.MMIX\.start\.\.text +2000000000000000 g O \*ABS\* 0+ __bss_start +2000000000000000 g O \*ABS\* 0+ _edata +2000000000000000 g O \*ABS\* 0+ _end +0+1000 g O \.text 0+ _start\. + +Contents of section \.text: + 1000 e3fd0001 fd030303 .* +Contents of section \.data: +Contents of section \.sbss: diff --git a/ld/testsuite/ld-mmix/loc3m.d b/ld/testsuite/ld-mmix/loc3m.d new file mode 100644 index 0000000..928ac9e --- /dev/null +++ b/ld/testsuite/ld-mmix/loc3m.d @@ -0,0 +1,14 @@ +#source: start.s +#source: loc1.s +#ld: -m mmo +#objdump: -str + +.*: file format mmo + +SYMBOL TABLE: +0+1000 g \.text Main +0+1000 g \.text _start +0+1004 g \.text loc1 + +Contents of section \.text: + 1000 e3fd0001 fd030303 .* diff --git a/ld/testsuite/ld-mmix/loc4.d b/ld/testsuite/ld-mmix/loc4.d new file mode 100644 index 0000000..3a8fa25 --- /dev/null +++ b/ld/testsuite/ld-mmix/loc4.d @@ -0,0 +1,35 @@ +#source: loc1.s +#source: data1.s +#source: start.s +#ld: -m elf64mmix +#objdump: -str + +# Two text files and one data. + +.*: file format elf64-mmix + +SYMBOL TABLE: +0+1000 l d \.text 0+ +2000000000000000 l d \.data 0+ +2000000000000008 l d \.sbss 0+ +2000000000000008 l d \.bss 0+ +0+ l d \*ABS\* 0+ +0+ l d \*ABS\* 0+ +0+ l d \*ABS\* 0+ +2000000000000000 l \.data 0+ xx +0+1004 g F \.text 0+ Main +2000000000000000 g \*ABS\* 0+ __\.MMIX\.start\.\.data +0+1004 g \.text 0+ _start +0+1000 g \.text 0+ loc1 +0+1000 g \*ABS\* 0+ __\.MMIX\.start\.\.text +2000000000000008 g O \*ABS\* 0+ __bss_start +2000000000000008 g O \*ABS\* 0+ _edata +2000000000000008 g O \*ABS\* 0+ _end +0+1004 g O \.text 0+ _start\. + + +Contents of section \.text: + 1000 fd030303 e3fd0001 .* +Contents of section \.data: + 0000 00000000 00001030 .* +Contents of section \.sbss: diff --git a/ld/testsuite/ld-mmix/loc4m.d b/ld/testsuite/ld-mmix/loc4m.d new file mode 100644 index 0000000..0bbd9c0 --- /dev/null +++ b/ld/testsuite/ld-mmix/loc4m.d @@ -0,0 +1,18 @@ +#source: loc1.s +#source: data1.s +#source: start.s +#ld: -m mmo +#objdump: -str + +.*: file format mmo + +SYMBOL TABLE: +0+1004 g \.text Main +0+1004 g \.text _start +0+1000 g \.text loc1 + +Contents of section \.text: + 1000 fd030303 e3fd0001 .* +Contents of section \.data: + 0004 00001030 .* + diff --git a/ld/testsuite/ld-mmix/loc5.d b/ld/testsuite/ld-mmix/loc5.d new file mode 100644 index 0000000..089c155 --- /dev/null +++ b/ld/testsuite/ld-mmix/loc5.d @@ -0,0 +1,6 @@ +#source: loc1.s +#source: start.s +#source: loc2.s +#ld: -m elf64mmix +#objdump: -str +#error: multiple definition of `__\.MMIX\.start\.\.text' diff --git a/ld/testsuite/ld-mmix/loc5m.d b/ld/testsuite/ld-mmix/loc5m.d new file mode 100644 index 0000000..8fedb1c --- /dev/null +++ b/ld/testsuite/ld-mmix/loc5m.d @@ -0,0 +1,6 @@ +#source: loc1.s +#source: start.s +#source: loc2.s +#ld: -m mmo +#objdump: -str +#error: multiple definition of `__\.MMIX\.start\.\.text' diff --git a/ld/testsuite/ld-mmix/loc6.d b/ld/testsuite/ld-mmix/loc6.d new file mode 100644 index 0000000..30fb75d --- /dev/null +++ b/ld/testsuite/ld-mmix/loc6.d @@ -0,0 +1,30 @@ +#source: dloc1.s +#source: start.s +#ld: -m elf64mmix +#objdump: -str + +# Text files and one loc:ed data at offset. + +.*: file format elf64-mmix + +SYMBOL TABLE: +0+ l d \.text 0+ +2000000000000200 l d \.data 0+ +200000000000020c l d \.sbss 0+ +200000000000020c l d \.bss 0+ +0+ l d \*ABS\* 0+ +0+ l d \*ABS\* 0+ +0+ l d \*ABS\* 0+ +2000000000000200 g \.data 0+ dloc1 +2000000000000200 g \*ABS\* 0+ __\.MMIX\.start\.\.data +0+ g \.text 0+ _start +200000000000020c g O \*ABS\* 0+ __bss_start +200000000000020c g O \*ABS\* 0+ _edata +2000000000000210 g O \*ABS\* 0+ _end +0+ g O \.text 0+ _start\. + +Contents of section \.text: + 0000 e3fd0001 .* +Contents of section \.data: + 0200 00000004 00000005 00000006 .* +Contents of section \.sbss: diff --git a/ld/testsuite/ld-mmix/loc6m.d b/ld/testsuite/ld-mmix/loc6m.d new file mode 100644 index 0000000..056e439 --- /dev/null +++ b/ld/testsuite/ld-mmix/loc6m.d @@ -0,0 +1,19 @@ +#source: dloc1.s +#source: start.s +#ld: -m mmo +#objdump: -str + +# Text files and one loc:ed data at offset. + +.*: file format mmo + +SYMBOL TABLE: +0+ g \.text Main +2000000000000200 g \.data dloc1 +0+ g \.text _start + +Contents of section \.text: + 0000 e3fd0001 .* +Contents of section \.data: + 0200 00000004 00000005 00000006 .* + diff --git a/ld/testsuite/ld-mmix/loc7.d b/ld/testsuite/ld-mmix/loc7.d new file mode 100644 index 0000000..b980f61 --- /dev/null +++ b/ld/testsuite/ld-mmix/loc7.d @@ -0,0 +1,6 @@ +#source: dloc1.s +#source: start.s +#source: dloc2.s +#ld: -m elf64mmix +#objdump: -str +#error: multiple definition of `__\.MMIX\.start\.\.data' diff --git a/ld/testsuite/ld-mmix/loc7m.d b/ld/testsuite/ld-mmix/loc7m.d new file mode 100644 index 0000000..be8115f --- /dev/null +++ b/ld/testsuite/ld-mmix/loc7m.d @@ -0,0 +1,6 @@ +#source: dloc1.s +#source: start.s +#source: dloc2.s +#ld: -m mmo +#objdump: -str +#error: multiple definition of `__\.MMIX\.start\.\.data' diff --git a/ld/testsuite/ld-mmix/local1.d b/ld/testsuite/ld-mmix/local1.d new file mode 100644 index 0000000..9954c73 --- /dev/null +++ b/ld/testsuite/ld-mmix/local1.d @@ -0,0 +1,65 @@ +#source: greg-4.s +#source: greg-4.s +#source: local1.s +#source: regext1.s +#source: start.s +#ld: -m elf64mmix +#readelf: -Ssx1 -x5 + +# We check that the externally visible symbol ext1 is a local register +# (different meaning of "local" than for symbol), which can be seen as +# somewhat twisted. + +There are 9 section headers, starting at offset 0x110: + +Section Headers: + \[Nr\] Name Type Address Offset + Size EntSize Flags Link Info Align + \[ 0\] NULL 0+ 0+ + 0+ 0+ 0 0 0 + \[ 1\] \.text PROGBITS 0+ 0+b0 + 0+8 0+ AX 0 0 4 + \[ 2\] \.data PROGBITS 2000000000000000 0+b8 + 0+ 0+ WA 0 0 1 + \[ 3\] \.sbss PROGBITS 2000000000000000 0+b8 + 0+ 0+ W 0 0 1 + \[ 4\] \.bss NOBITS 2000000000000000 0+b8 + 0+ 0+ WA 0 0 1 + \[ 5\] \.MMIX\.reg_content PROGBITS 0+7e8 0+b8 + 0+10 0+ W 0 0 1 + \[ 6\] \.shstrtab STRTAB 0+ 0+c8 + 0+45 0+ 0 0 1 + \[ 7\] \.symtab SYMTAB 0+ 0+350 + 0+198 0+18 8 b 8 + \[ 8\] \.strtab STRTAB 0+ 0+4e8 + 0+32 0+ 0 0 1 +Key to Flags: + W \(write\), A \(alloc\), X \(execute\), M \(merge\), S \(strings\) + I \(info\), L \(link order\), G \(group\), x \(unknown\) + O \(extra OS processing required\) o \(OS specific\), p \(processor specific\) + +Symbol table '\.symtab' contains 17 entries: + Num: Value Size Type Bind Vis Ndx Name + 0: 0+ 0 NOTYPE LOCAL DEFAULT UND + 1: 0+ 0 SECTION LOCAL DEFAULT 1 + 2: 20+ 0 SECTION LOCAL DEFAULT 2 + 3: 2000000000000000 0 SECTION LOCAL DEFAULT 3 + 4: 2000000000000000 0 SECTION LOCAL DEFAULT 4 + 5: 0+7e8 0 SECTION LOCAL DEFAULT 5 + 6: 0+ 0 SECTION LOCAL DEFAULT 6 + 7: 0+ 0 SECTION LOCAL DEFAULT 7 + 8: 0+ 0 SECTION LOCAL DEFAULT 8 + 9: 0+fd 0 NOTYPE LOCAL DEFAULT PRC lsym + 10: 0+fe 0 NOTYPE LOCAL DEFAULT PRC lsym + 11: 0+fc 0 NOTYPE GLOBAL DEFAULT PRC ext1 + 12: 0+4 0 NOTYPE GLOBAL DEFAULT 1 _start + 13: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS __bss_start + 14: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS _edata + 15: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS _end + 16: 0+4 0 OBJECT GLOBAL DEFAULT 1 _start\. + +Hex dump of section '\.text': + 0x0+ fd030201 e3fd0001 .* + +Hex dump of section '\.MMIX\.reg_contents': + 0x0+7e8 00000000 0000004e 00000000 0000004e .* diff --git a/ld/testsuite/ld-mmix/local1.s b/ld/testsuite/ld-mmix/local1.s new file mode 100644 index 0000000..47bf390 --- /dev/null +++ b/ld/testsuite/ld-mmix/local1.s @@ -0,0 +1,2 @@ + LOCAL ext1 + SWYM 3,2,1 diff --git a/ld/testsuite/ld-mmix/local10.d b/ld/testsuite/ld-mmix/local10.d new file mode 100644 index 0000000..f276405 --- /dev/null +++ b/ld/testsuite/ld-mmix/local10.d @@ -0,0 +1,5 @@ +#source: local1.s +#source: ext1g.s +#source: start.s +#ld: -m elf64mmix +#error: 254 is not a local register diff --git a/ld/testsuite/ld-mmix/local10m.d b/ld/testsuite/ld-mmix/local10m.d new file mode 100644 index 0000000..9095d74 --- /dev/null +++ b/ld/testsuite/ld-mmix/local10m.d @@ -0,0 +1,5 @@ +#source: local1.s +#source: ext1g.s +#source: start.s +#ld: -m mmo +#error: 254 is not a local register diff --git a/ld/testsuite/ld-mmix/local11.d b/ld/testsuite/ld-mmix/local11.d new file mode 100644 index 0000000..761cea0 --- /dev/null +++ b/ld/testsuite/ld-mmix/local11.d @@ -0,0 +1,6 @@ +#source: local1.s +#source: greg-1.s +#source: ext1l.s +#source: start.s +#ld: -m elf64mmix +#error: valid only with a register or absolute value diff --git a/ld/testsuite/ld-mmix/local11m.d b/ld/testsuite/ld-mmix/local11m.d new file mode 100644 index 0000000..b6952a7 --- /dev/null +++ b/ld/testsuite/ld-mmix/local11m.d @@ -0,0 +1,6 @@ +#source: local1.s +#source: greg-1.s +#source: ext1l.s +#source: start.s +#ld: -m mmo +#error: valid only with a register or absolute value diff --git a/ld/testsuite/ld-mmix/local12.d b/ld/testsuite/ld-mmix/local12.d new file mode 100644 index 0000000..102f448 --- /dev/null +++ b/ld/testsuite/ld-mmix/local12.d @@ -0,0 +1,24 @@ +#source: local1.s +#source: ext1-254.s +#source: start.s +#ld: -m elf64mmix +#objdump: -shr + +# Check that 254 is local when we don't have any registers. + +.*: file format elf64-mmix + +Sections: +Idx Name Size VMA LMA File off Algn + 0 \.text 0+8 0+ 0+ 0+b0 2\*\*2 + CONTENTS, ALLOC, LOAD, READONLY, CODE + 1 \.data 0+ 2000000000000000 2000000000000000 0+b8 2\*\*0 + CONTENTS, ALLOC, LOAD, DATA + 2 \.sbss 0+ 2000000000000000 2000000000000000 0+b8 2\*\*0 + CONTENTS + 3 \.bss 0+ 2000000000000000 2000000000000000 0+b8 2\*\*0 + ALLOC +Contents of section \.text: + 0000 fd030201 e3fd0001 .* +Contents of section \.data: +Contents of section \.sbss: diff --git a/ld/testsuite/ld-mmix/local12m.d b/ld/testsuite/ld-mmix/local12m.d new file mode 100644 index 0000000..2cfb701 --- /dev/null +++ b/ld/testsuite/ld-mmix/local12m.d @@ -0,0 +1,16 @@ +#source: local1.s +#source: ext1-254.s +#source: start.s +#ld: -m mmo +#objdump: -shr + +# Check that 254 is local when we don't have any registers. + +.*: file format mmo + +Sections: +Idx Name Size VMA LMA File off Algn + 0 \.text 0+8 0+ 0+ 0+ 2\*\*2 + CONTENTS, ALLOC, LOAD, CODE +Contents of section \.text: + 0000 fd030201 e3fd0001 .* diff --git a/ld/testsuite/ld-mmix/local1m.d b/ld/testsuite/ld-mmix/local1m.d new file mode 100644 index 0000000..db36ac5 --- /dev/null +++ b/ld/testsuite/ld-mmix/local1m.d @@ -0,0 +1,21 @@ +#source: greg-4.s +#source: greg-4.s +#source: local1.s +#source: regext1.s +#source: start.s +#ld: -m mmo +#objdump: -str + +.*: file format mmo + +SYMBOL TABLE: +0+4 g \.text Main +0+fc g \*REG\* ext1 +0+4 g \.text _start + + +Contents of section \.text: + 0000 fd030201 e3fd0001 .* +Contents of section \.MMIX\.reg_contents: + 07e8 00000000 0000004e 00000000 0000004e .* + diff --git a/ld/testsuite/ld-mmix/local2.d b/ld/testsuite/ld-mmix/local2.d new file mode 100644 index 0000000..e5ad203 --- /dev/null +++ b/ld/testsuite/ld-mmix/local2.d @@ -0,0 +1,8 @@ +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: local1.s +#source: regext1.s +#source: start.s +#ld: -m elf64mmix +#error: not a local register diff --git a/ld/testsuite/ld-mmix/local2.s b/ld/testsuite/ld-mmix/local2.s new file mode 100644 index 0000000..9d2c329 --- /dev/null +++ b/ld/testsuite/ld-mmix/local2.s @@ -0,0 +1,2 @@ + LOCAL 128 + SWYM 2,2,2 diff --git a/ld/testsuite/ld-mmix/local2m.d b/ld/testsuite/ld-mmix/local2m.d new file mode 100644 index 0000000..6e88936 --- /dev/null +++ b/ld/testsuite/ld-mmix/local2m.d @@ -0,0 +1,8 @@ +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: local1.s +#source: regext1.s +#source: start.s +#ld: -m mmo +#error: not a local register diff --git a/ld/testsuite/ld-mmix/local3.d b/ld/testsuite/ld-mmix/local3.d new file mode 100644 index 0000000..b51f27f --- /dev/null +++ b/ld/testsuite/ld-mmix/local3.d @@ -0,0 +1,63 @@ +#source: greg-4.s +#source: greg-4.s +#source: local1.s +#source: ext1.s +#source: start.s +#ld: -m elf64mmix +#readelf: -Ssx1 -x5 + +# Like local1, but ext1 is here a constant, not a global register. + +There are 9 section headers, starting at offset 0x110: + +Section Headers: + \[Nr\] Name Type Address Offset + Size EntSize Flags Link Info Align + \[ 0\] NULL 0+ 0+ + 0+ 0+ 0 0 0 + \[ 1\] \.text PROGBITS 0+ 0+b0 + 0+8 0+ AX 0 0 4 + \[ 2\] \.data PROGBITS 2000000000000000 0+b8 + 0+ 0+ WA 0 0 1 + \[ 3\] \.sbss PROGBITS 2000000000000000 0+b8 + 0+ 0+ W 0 0 1 + \[ 4\] \.bss NOBITS 2000000000000000 0+b8 + 0+ 0+ WA 0 0 1 + \[ 5\] \.MMIX\.reg_content PROGBITS 0+7e8 0+b8 + 0+10 0+ W 0 0 1 + \[ 6\] \.shstrtab STRTAB 0+ 0+c8 + 0+45 0+ 0 0 1 + \[ 7\] \.symtab SYMTAB 0+ 0+350 + 0+198 0+18 8 b 8 + \[ 8\] \.strtab STRTAB 0+ 0+4e8 + 0+32 0+ 0 0 1 +Key to Flags: + W \(write\), A \(alloc\), X \(execute\), M \(merge\), S \(strings\) + I \(info\), L \(link order\), G \(group\), x \(unknown\) + O \(extra OS processing required\) o \(OS specific\), p \(processor specific\) + +Symbol table '\.symtab' contains 17 entries: + Num: Value Size Type Bind Vis Ndx Name + 0: 0+ 0 NOTYPE LOCAL DEFAULT UND + 1: 0+ 0 SECTION LOCAL DEFAULT 1 + 2: 2000000000000000 0 SECTION LOCAL DEFAULT 2 + 3: 2000000000000000 0 SECTION LOCAL DEFAULT 3 + 4: 2000000000000000 0 SECTION LOCAL DEFAULT 4 + 5: 0+7e8 0 SECTION LOCAL DEFAULT 5 + 6: 0+ 0 SECTION LOCAL DEFAULT 6 + 7: 0+ 0 SECTION LOCAL DEFAULT 7 + 8: 0+ 0 SECTION LOCAL DEFAULT 8 + 9: 0+fd 0 NOTYPE LOCAL DEFAULT PRC lsym + 10: 0+fe 0 NOTYPE LOCAL DEFAULT PRC lsym + 11: 0+fc 0 NOTYPE GLOBAL DEFAULT ABS ext1 + 12: 0+4 0 NOTYPE GLOBAL DEFAULT 1 _start + 13: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS __bss_start + 14: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS _edata + 15: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS _end + 16: 0+4 0 OBJECT GLOBAL DEFAULT 1 _start\. + +Hex dump of section '\.text': + 0x0+ fd030201 e3fd0001 .* + +Hex dump of section '\.MMIX\.reg_contents': + 0x0+7e8 00000000 0000004e 00000000 0000004e .* diff --git a/ld/testsuite/ld-mmix/local3m.d b/ld/testsuite/ld-mmix/local3m.d new file mode 100644 index 0000000..ea35d30 --- /dev/null +++ b/ld/testsuite/ld-mmix/local3m.d @@ -0,0 +1,21 @@ +#source: greg-4.s +#source: greg-4.s +#source: local1.s +#source: ext1.s +#source: start.s +#ld: -m mmo +#objdump: -str + +.*: file format mmo + +SYMBOL TABLE: +0+4 g \.text Main +0+fc g \*ABS\* ext1 +0+4 g \.text _start + + +Contents of section \.text: + 0000 fd030201 e3fd0001 .* +Contents of section \.MMIX\.reg_contents: + 07e8 00000000 0000004e 00000000 0000004e .* + diff --git a/ld/testsuite/ld-mmix/local4.d b/ld/testsuite/ld-mmix/local4.d new file mode 100644 index 0000000..13fa8e6 --- /dev/null +++ b/ld/testsuite/ld-mmix/local4.d @@ -0,0 +1,8 @@ +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: local1.s +#source: ext1.s +#source: start.s +#ld: -m elf64mmix +#error: not a local register diff --git a/ld/testsuite/ld-mmix/local4m.d b/ld/testsuite/ld-mmix/local4m.d new file mode 100644 index 0000000..d18cb20 --- /dev/null +++ b/ld/testsuite/ld-mmix/local4m.d @@ -0,0 +1,8 @@ +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: local1.s +#source: ext1.s +#source: start.s +#ld: -m mmo +#error: is not a local register diff --git a/ld/testsuite/ld-mmix/local5.d b/ld/testsuite/ld-mmix/local5.d new file mode 100644 index 0000000..5e92e99 --- /dev/null +++ b/ld/testsuite/ld-mmix/local5.d @@ -0,0 +1,64 @@ +#source: greg-4.s +#source: greg-4.s +#source: local2.s +#source: local1.s +#source: regext1.s +#source: start.s +#ld: -m elf64mmix +#readelf: -Ssx1 -x5 + +# Like local1, but with two checks for a local register. + +There are 9 section headers, starting at offset 0x118: + +Section Headers: + \[Nr\] Name Type Address Offset + Size EntSize Flags Link Info Align + \[ 0\] NULL 0+ 0+ + 0+ 0+ 0 0 0 + \[ 1\] \.text PROGBITS 0+ 0+b0 + 0+c 0+ AX 0 0 4 + \[ 2\] \.data PROGBITS 2000000000000000 0+bc + 0+ 0+ WA 0 0 1 + \[ 3\] \.sbss PROGBITS 2000000000000000 0+bc + 0+ 0+ W 0 0 1 + \[ 4\] \.bss NOBITS 2000000000000000 0+bc + 0+ 0+ WA 0 0 1 + \[ 5\] \.MMIX\.reg_content PROGBITS 0+7e8 0+bc + 0+10 0+ W 0 0 1 + \[ 6\] \.shstrtab STRTAB 0+ 0+cc + 0+45 0+ 0 0 1 + \[ 7\] \.symtab SYMTAB 0+ 0+358 + 0+198 0+18 8 b 8 + \[ 8\] \.strtab STRTAB 0+ 0+4f0 + 0+32 0+ 0 0 1 +Key to Flags: + W \(write\), A \(alloc\), X \(execute\), M \(merge\), S \(strings\) + I \(info\), L \(link order\), G \(group\), x \(unknown\) + O \(extra OS processing required\) o \(OS specific\), p \(processor specific\) + +Symbol table '\.symtab' contains 17 entries: + Num: Value Size Type Bind Vis Ndx Name + 0: 0+ 0 NOTYPE LOCAL DEFAULT UND + 1: 0+ 0 SECTION LOCAL DEFAULT 1 + 2: 2000000000000000 0 SECTION LOCAL DEFAULT 2 + 3: 2000000000000000 0 SECTION LOCAL DEFAULT 3 + 4: 2000000000000000 0 SECTION LOCAL DEFAULT 4 + 5: 0+7e8 0 SECTION LOCAL DEFAULT 5 + 6: 0+ 0 SECTION LOCAL DEFAULT 6 + 7: 0+ 0 SECTION LOCAL DEFAULT 7 + 8: 0+ 0 SECTION LOCAL DEFAULT 8 + 9: 0+fd 0 NOTYPE LOCAL DEFAULT PRC lsym + 10: 0+fe 0 NOTYPE LOCAL DEFAULT PRC lsym + 11: 0+fc 0 NOTYPE GLOBAL DEFAULT PRC ext1 + 12: 0+8 0 NOTYPE GLOBAL DEFAULT 1 _start + 13: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS __bss_start + 14: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS _edata + 15: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS _end + 16: 0+8 0 OBJECT GLOBAL DEFAULT 1 _start\. + +Hex dump of section '\.text': + 0x0+ fd020202 fd030201 e3fd0001 .* + +Hex dump of section '\.MMIX\.reg_contents': + 0x0+7e8 00000000 0000004e 00000000 0000004e .* diff --git a/ld/testsuite/ld-mmix/local5m.d b/ld/testsuite/ld-mmix/local5m.d new file mode 100644 index 0000000..6b4c89b --- /dev/null +++ b/ld/testsuite/ld-mmix/local5m.d @@ -0,0 +1,21 @@ +#source: greg-4.s +#source: greg-4.s +#source: local2.s +#source: local1.s +#source: regext1.s +#source: start.s +#ld: -m mmo +#objdump: -str + +.*: file format mmo + +SYMBOL TABLE: +0+8 g \.text Main +0+fc g \*REG\* ext1 +0+8 g \.text _start + + +Contents of section \.text: + 0000 fd020202 fd030201 e3fd0001 .* +Contents of section \.MMIX\.reg_contents: + 07e8 00000000 0000004e 00000000 0000004e .* diff --git a/ld/testsuite/ld-mmix/local6.d b/ld/testsuite/ld-mmix/local6.d new file mode 100644 index 0000000..b2ed1ed --- /dev/null +++ b/ld/testsuite/ld-mmix/local6.d @@ -0,0 +1,9 @@ +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: local1.s +#source: local2.s +#source: ext1.s +#source: start.s +#ld: -m elf64mmix +#error: not a local register diff --git a/ld/testsuite/ld-mmix/local6m.d b/ld/testsuite/ld-mmix/local6m.d new file mode 100644 index 0000000..be64ca2 --- /dev/null +++ b/ld/testsuite/ld-mmix/local6m.d @@ -0,0 +1,9 @@ +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: local1.s +#source: local2.s +#source: ext1.s +#source: start.s +#ld: -m mmo +#error: not a local register diff --git a/ld/testsuite/ld-mmix/local7.d b/ld/testsuite/ld-mmix/local7.d new file mode 100644 index 0000000..d92b074 --- /dev/null +++ b/ld/testsuite/ld-mmix/local7.d @@ -0,0 +1,65 @@ +#source: greg-4.s +#source: greg-4.s +#source: local1.s +#source: local2.s +#source: ext1.s +#source: start.s +#ld: -m elf64mmix +#readelf: -Ssx1 -x5 + +# Like local1, but ext1 is here a constant, not a global register and two +# local-register checks. + +There are 9 section headers, starting at offset 0x118: + +Section Headers: + \[Nr\] Name Type Address Offset + Size EntSize Flags Link Info Align + \[ 0\] NULL 0+ 0+ + 0+ 0+ 0 0 0 + \[ 1\] \.text PROGBITS 0+ 0+b0 + 0+c 0+ AX 0 0 4 + \[ 2\] \.data PROGBITS 2000000000000000 0+bc + 0+ 0+ WA 0 0 1 + \[ 3\] \.sbss PROGBITS 2000000000000000 0+bc + 0+ 0+ W 0 0 1 + \[ 4\] \.bss NOBITS 2000000000000000 0+bc + 0+ 0+ WA 0 0 1 + \[ 5\] \.MMIX\.reg_content PROGBITS 0+7e8 0+bc + 0+10 0+ W 0 0 1 + \[ 6\] \.shstrtab STRTAB 0+ 0+cc + 0+45 0+ 0 0 1 + \[ 7\] \.symtab SYMTAB 0+ 0+358 + 0+198 0+18 8 b 8 + \[ 8\] \.strtab STRTAB 0+ 0+4f0 + 0+32 0+ 0 0 1 +Key to Flags: + W \(write\), A \(alloc\), X \(execute\), M \(merge\), S \(strings\) + I \(info\), L \(link order\), G \(group\), x \(unknown\) + O \(extra OS processing required\) o \(OS specific\), p \(processor specific\) + +Symbol table '\.symtab' contains 17 entries: + Num: Value Size Type Bind Vis Ndx Name + 0: 0+ 0 NOTYPE LOCAL DEFAULT UND + 1: 0+ 0 SECTION LOCAL DEFAULT 1 + 2: 2000000000000000 0 SECTION LOCAL DEFAULT 2 + 3: 2000000000000000 0 SECTION LOCAL DEFAULT 3 + 4: 2000000000000000 0 SECTION LOCAL DEFAULT 4 + 5: 0+7e8 0 SECTION LOCAL DEFAULT 5 + 6: 0+ 0 SECTION LOCAL DEFAULT 6 + 7: 0+ 0 SECTION LOCAL DEFAULT 7 + 8: 0+ 0 SECTION LOCAL DEFAULT 8 + 9: 0+fd 0 NOTYPE LOCAL DEFAULT PRC lsym + 10: 0+fe 0 NOTYPE LOCAL DEFAULT PRC lsym + 11: 0+fc 0 NOTYPE GLOBAL DEFAULT ABS ext1 + 12: 0+8 0 NOTYPE GLOBAL DEFAULT 1 _start + 13: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS __bss_start + 14: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS _edata + 15: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS _end + 16: 0+8 0 OBJECT GLOBAL DEFAULT 1 _start\. + +Hex dump of section '\.text': + 0x0+ fd030201 fd020202 e3fd0001 .* + +Hex dump of section '\.MMIX\.reg_contents': + 0x0+7e8 00000000 0000004e 00000000 0000004e .* diff --git a/ld/testsuite/ld-mmix/local7m.d b/ld/testsuite/ld-mmix/local7m.d new file mode 100644 index 0000000..4095f2f --- /dev/null +++ b/ld/testsuite/ld-mmix/local7m.d @@ -0,0 +1,21 @@ +#source: greg-4.s +#source: greg-4.s +#source: local1.s +#source: local2.s +#source: ext1.s +#source: start.s +#ld: -m mmo +#objdump: -str + +.*: file format mmo + +SYMBOL TABLE: +0+8 g \.text Main +0+fc g \*ABS\* ext1 +0+8 g \.text _start + + +Contents of section \.text: + 0000 fd030201 fd020202 e3fd0001 .* +Contents of section \.MMIX\.reg_contents: + 07e8 00000000 0000004e 00000000 0000004e .* diff --git a/ld/testsuite/ld-mmix/local8.d b/ld/testsuite/ld-mmix/local8.d new file mode 100644 index 0000000..f82e6d0 --- /dev/null +++ b/ld/testsuite/ld-mmix/local8.d @@ -0,0 +1,28 @@ +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: local2.s +#source: local1.s +#source: ext1.s +#source: start.s +#ld: -m elf64mmix +#error: 128 is not a local register diff --git a/ld/testsuite/ld-mmix/local8m.d b/ld/testsuite/ld-mmix/local8m.d new file mode 100644 index 0000000..4e07afe --- /dev/null +++ b/ld/testsuite/ld-mmix/local8m.d @@ -0,0 +1,28 @@ +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-5.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: greg-4.s +#source: local2.s +#source: local1.s +#source: ext1.s +#source: start.s +#ld: -m mmo +#error: 128 is not a local register diff --git a/ld/testsuite/ld-mmix/local9.d b/ld/testsuite/ld-mmix/local9.d new file mode 100644 index 0000000..cc4f8c7 --- /dev/null +++ b/ld/testsuite/ld-mmix/local9.d @@ -0,0 +1,5 @@ +#source: local1.s +#source: ext1l.s +#source: start.s +#ld: -m elf64mmix +#error: valid only with a register or absolute value diff --git a/ld/testsuite/ld-mmix/local9m.d b/ld/testsuite/ld-mmix/local9m.d new file mode 100644 index 0000000..7842984 --- /dev/null +++ b/ld/testsuite/ld-mmix/local9m.d @@ -0,0 +1,5 @@ +#source: local1.s +#source: ext1l.s +#source: start.s +#ld: -m mmo +#error: valid only with a register or absolute value diff --git a/ld/testsuite/ld-mmix/locdo-1.d b/ld/testsuite/ld-mmix/locdo-1.d new file mode 100644 index 0000000..7b71542 --- /dev/null +++ b/ld/testsuite/ld-mmix/locdo-1.d @@ -0,0 +1,29 @@ +#source: locdo.s -globalize-symbols +#source: start.s +#ld: -m elf64mmix +#objdump: -str + +.*: file format elf64-mmix + +SYMBOL TABLE: +0+ l d \.text 0+ +2000000000000008 l d \.data 0+ +2000000000000010 l d \.sbss 0+ +2000000000000010 l d \.bss 0+ +0+ l d \*ABS\* 0+ +0+ l d \*ABS\* 0+ +0+ l d \*ABS\* 0+ +2000000000000008 g \*ABS\* 0+ __\.MMIX\.start\.\.data +2000000000000008 g \.data 0+ od +0+ g \.text 0+ _start +2000000000000010 g O \*ABS\* 0+ __bss_start +2000000000000000 g \*ABS\* 0+ Data_Segment +2000000000000010 g O \*ABS\* 0+ _edata +2000000000000010 g O \*ABS\* 0+ _end +0+ g O \.text 0+ _start\. + +Contents of section \.text: + 0000 e3fd0001 \.\.\.\. +Contents of section \.data: + 0008 20000000 00000008 \.\.\.\.\.\.\. +Contents of section \.sbss: diff --git a/ld/testsuite/ld-mmix/locdo.s b/ld/testsuite/ld-mmix/locdo.s new file mode 100644 index 0000000..3402445 --- /dev/null +++ b/ld/testsuite/ld-mmix/locdo.s @@ -0,0 +1,2 @@ + LOC Data_Segment+2 +od OCTA od diff --git a/ld/testsuite/ld-mmix/loct-1.d b/ld/testsuite/ld-mmix/loct-1.d new file mode 100644 index 0000000..eb121d5 --- /dev/null +++ b/ld/testsuite/ld-mmix/loct-1.d @@ -0,0 +1,27 @@ +#source: loct.s +#source: start.s +#ld: -m elf64mmix +#objdump: -str + +.*: file format elf64-mmix + +SYMBOL TABLE: +0+1004 l d \.text 0+ +2000000000000000 l d \.data 0+ +2000000000000000 l d \.sbss 0+ +2000000000000000 l d \.bss 0+ +0+ l d \*ABS\* 0+ +0+ l d \*ABS\* 0+ +0+ l d \*ABS\* 0+ +0+1004 l \.text 0+ t +0+100c g \.text 0+ _start +0+1004 g \*ABS\* 0+ __\.MMIX\.start\.\.text +2000000000000000 g O \*ABS\* 0+ __bss_start +2000000000000000 g O \*ABS\* 0+ _edata +2000000000000000 g O \*ABS\* 0+ _end +0+100c g O \.text 0+ _start\. + +Contents of section \.text: + 1004 fd000000 00001004 e3fd0001 .* +Contents of section \.data: +Contents of section \.sbss: diff --git a/ld/testsuite/ld-mmix/loct.s b/ld/testsuite/ld-mmix/loct.s new file mode 100644 index 0000000..5bf0973 --- /dev/null +++ b/ld/testsuite/ld-mmix/loct.s @@ -0,0 +1,4 @@ + LOC #1002 +t SWYM + TETRA t + diff --git a/ld/testsuite/ld-mmix/locto-1.d b/ld/testsuite/ld-mmix/locto-1.d new file mode 100644 index 0000000..26d817b --- /dev/null +++ b/ld/testsuite/ld-mmix/locto-1.d @@ -0,0 +1,27 @@ +#source: locto.s -globalize-symbols +#source: start.s +#ld: -m elf64mmix +#objdump: -str + +.*: file format elf64-mmix + +SYMBOL TABLE: +0+1008 l d \.text 0+ +2000000000000000 l d \.data 0+ +2000000000000000 l d \.sbss 0+ +2000000000000000 l d \.bss 0+ +0+ l d \*ABS\* 0+ +0+ l d \*ABS\* 0+ +0+ l d \*ABS\* 0+ +0+1008 g \.text 0+ od +0+1010 g \.text 0+ _start +0+1008 g \*ABS\* 0+ __\.MMIX\.start\.\.text +2000000000000000 g O \*ABS\* 0+ __bss_start +2000000000000000 g O \*ABS\* 0+ _edata +2000000000000000 g O \*ABS\* 0+ _end +0+1010 g O \.text 0+ _start\. + +Contents of section \.text: + 1008 00000000 00001008 e3fd0001 .* +Contents of section \.data: +Contents of section \.sbss: diff --git a/ld/testsuite/ld-mmix/locto.s b/ld/testsuite/ld-mmix/locto.s new file mode 100644 index 0000000..d0b6e0a --- /dev/null +++ b/ld/testsuite/ld-mmix/locto.s @@ -0,0 +1,3 @@ + LOC #1002 +od OCTA od + diff --git a/ld/testsuite/ld-mmix/main1.s b/ld/testsuite/ld-mmix/main1.s new file mode 100644 index 0000000..212d1ef --- /dev/null +++ b/ld/testsuite/ld-mmix/main1.s @@ -0,0 +1,5 @@ +% For tests regarding the Main symbol and mmo. Most tests use start.s as +% a base file. + .text +Main: + SET $253,1 diff --git a/ld/testsuite/ld-mmix/mmix.exp b/ld/testsuite/ld-mmix/mmix.exp new file mode 100644 index 0000000..89a23c6 --- /dev/null +++ b/ld/testsuite/ld-mmix/mmix.exp @@ -0,0 +1,32 @@ +# Expect script for ld-mmix tests +# Copyright 2001 Free Software Foundation, Inc. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# Written by Hans-Peter Nilsson (hp@bitrange.com) +# + +# Test MMIX and mmo object format handling. + +if ![istarget mmix-*-*] { + return +} + +set rd_test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]] +foreach mmixtest $rd_test_list { + # We need to strip the ".d", but can leave the dirname. + verbose [file rootname $mmixtest] + run_dump_test [file rootname $mmixtest] +} diff --git a/ld/testsuite/ld-mmix/mmohdr1.ld b/ld/testsuite/ld-mmix/mmohdr1.ld new file mode 100644 index 0000000..716c3f4 --- /dev/null +++ b/ld/testsuite/ld-mmix/mmohdr1.ld @@ -0,0 +1,11 @@ +OUTPUT_ARCH(mmix) +OUTPUT_FORMAT("mmo") +ENTRY(Main) +SECTIONS +{ + .text 0x100 + sizeof_headers : + { *(.text); Main = _start; } + + .MMIX.reg_contents : + { *(.MMIX.reg_contents); } +} diff --git a/ld/testsuite/ld-mmix/mmosec1.ld b/ld/testsuite/ld-mmix/mmosec1.ld new file mode 100644 index 0000000..4e7e799 --- /dev/null +++ b/ld/testsuite/ld-mmix/mmosec1.ld @@ -0,0 +1,16 @@ +OUTPUT_ARCH(mmix) +ENTRY(Main) +SECTIONS +{ + .text 0x100 : + { *(.text); Main = _start; } + + .other 0x1000000000000000 : + { *(secname); *(anothersec); *(thirdsec); *(.a.fourth.section); } + + .data 0x2000000000000000 : + { *(.data); } + + .MMIX.reg_contents : + { *(.MMIX.reg_contents); } +} diff --git a/ld/testsuite/ld-mmix/mmosec2.ld b/ld/testsuite/ld-mmix/mmosec2.ld new file mode 100644 index 0000000..57025e2 --- /dev/null +++ b/ld/testsuite/ld-mmix/mmosec2.ld @@ -0,0 +1,13 @@ +OUTPUT_ARCH(mmix) +ENTRY(Main) +SECTIONS +{ + .text 0x1000000000000000 : + { *(.text); Main = _start; } + + .data 0x2000000000000000 : + { *(.data); } + + .MMIX.reg_contents : + { *(.MMIX.reg_contents); } +} diff --git a/ld/testsuite/ld-mmix/nop123.s b/ld/testsuite/ld-mmix/nop123.s new file mode 100644 index 0000000..2d14f43 --- /dev/null +++ b/ld/testsuite/ld-mmix/nop123.s @@ -0,0 +1,3 @@ +# A nop to pad with an explicit insn. + .text + SWYM 1,2,3 diff --git a/ld/testsuite/ld-mmix/pad16.s b/ld/testsuite/ld-mmix/pad16.s new file mode 100644 index 0000000..7692337 --- /dev/null +++ b/ld/testsuite/ld-mmix/pad16.s @@ -0,0 +1,4 @@ +* Padding 16 bytes, suitable for testing relocs together with the larger +* padding files. + .text + .space 16,0 diff --git a/ld/testsuite/ld-mmix/pad2p18m32.s b/ld/testsuite/ld-mmix/pad2p18m32.s new file mode 100644 index 0000000..ede581f --- /dev/null +++ b/ld/testsuite/ld-mmix/pad2p18m32.s @@ -0,0 +1,4 @@ +* Padding (1 << 19)/2 - 32 bytes; that is, suitable for testing the +* short-range relocs. + .text + .space (1 << 19)/2 - 32,0 diff --git a/ld/testsuite/ld-mmix/pad2p26m32.s b/ld/testsuite/ld-mmix/pad2p26m32.s new file mode 100644 index 0000000..05f45c8 --- /dev/null +++ b/ld/testsuite/ld-mmix/pad2p26m32.s @@ -0,0 +1,4 @@ +* Padding (1 << 27)/2 - 32 bytes; that is, suitable for testing the +* long-range relocs. + .text + .space (1 << 27)/2 - 32,0 diff --git a/ld/testsuite/ld-mmix/pad4.s b/ld/testsuite/ld-mmix/pad4.s new file mode 100644 index 0000000..49dbe6d --- /dev/null +++ b/ld/testsuite/ld-mmix/pad4.s @@ -0,0 +1,4 @@ +* Padding 16 bytes, suitable for testing relocs together with the larger +* padding files. + .text + .space 4,0 diff --git a/ld/testsuite/ld-mmix/pushja.s b/ld/testsuite/ld-mmix/pushja.s new file mode 100644 index 0000000..857ca9d --- /dev/null +++ b/ld/testsuite/ld-mmix/pushja.s @@ -0,0 +1,7 @@ +* Just PUSHJs to an external symbol, with some padding. + .text + .global pushja +pushja: + SET $253,2 + PUSHJ $12,a + SET $253,3 diff --git a/ld/testsuite/ld-mmix/pushja1b.d b/ld/testsuite/ld-mmix/pushja1b.d new file mode 100644 index 0000000..80d1da7 --- /dev/null +++ b/ld/testsuite/ld-mmix/pushja1b.d @@ -0,0 +1,25 @@ +#source: start.s +#source: a.s +#source: pushja.s +#as: -x +#ld: -m elf64mmix +#objdump: -dr + +.*: file format elf64-mmix + +Disassembly of section \.text: + +0+ <_start>: + 0: e3fd0001 setl \$253,0x1 + +0+4 <a>: + 4: e3fd0004 setl \$253,0x4 + +0+8 <pushja>: + 8: e3fd0002 setl \$253,0x2 + c: e3ff0004 setl \$255,0x4 + 10: e6ff0000 incml \$255,0x0 + 14: e5ff0000 incmh \$255,0x0 + 18: e4ff0000 inch \$255,0x0 + 1c: bf0cff00 pushgo \$12,\$255,0 + 20: e3fd0003 setl \$253,0x3 diff --git a/ld/testsuite/ld-mmix/pushja1f.d b/ld/testsuite/ld-mmix/pushja1f.d new file mode 100644 index 0000000..57879d8 --- /dev/null +++ b/ld/testsuite/ld-mmix/pushja1f.d @@ -0,0 +1,25 @@ +#source: start.s +#source: pushja.s +#source: a.s +#as: -x +#ld: -m elf64mmix +#objdump: -dr + +.*: file format elf64-mmix + +Disassembly of section \.text: + +0+ <_start>: + 0: e3fd0001 setl \$253,0x1 + +0+4 <pushja>: + 4: e3fd0002 setl \$253,0x2 + 8: e3ff0020 setl \$255,0x20 + c: e6ff0000 incml \$255,0x0 + 10: e5ff0000 incmh \$255,0x0 + 14: e4ff0000 inch \$255,0x0 + 18: bf0cff00 pushgo \$12,\$255,0 + 1c: e3fd0003 setl \$253,0x3 + +0+20 <a>: + 20: e3fd0004 setl \$253,0x4 diff --git a/ld/testsuite/ld-mmix/pushja2b.d b/ld/testsuite/ld-mmix/pushja2b.d new file mode 100644 index 0000000..623754f --- /dev/null +++ b/ld/testsuite/ld-mmix/pushja2b.d @@ -0,0 +1,21 @@ +#source: start.s +#source: a.s +#source: pushja.s +#as: -no-expand +#ld: -m elf64mmix +#objdump: -dr + +.*: file format elf64-mmix + +Disassembly of section \.text: + +0+ <_start>: + 0: e3fd0001 setl \$253,0x1 + +0+4 <a>: + 4: e3fd0004 setl \$253,0x4 + +0+8 <pushja>: + 8: e3fd0002 setl \$253,0x2 + c: f30cfffe pushj \$12,4 <a> + 10: e3fd0003 setl \$253,0x3 diff --git a/ld/testsuite/ld-mmix/pushja2f.d b/ld/testsuite/ld-mmix/pushja2f.d new file mode 100644 index 0000000..687d559 --- /dev/null +++ b/ld/testsuite/ld-mmix/pushja2f.d @@ -0,0 +1,21 @@ +#source: start.s +#source: pushja.s +#source: a.s +#as: -no-expand +#ld: -m elf64mmix +#objdump: -dr + +.*: file format elf64-mmix + +Disassembly of section \.text: + +0+ <_start>: + 0: e3fd0001 setl \$253,0x1 + +0+4 <pushja>: + 4: e3fd0002 setl \$253,0x2 + 8: f20c0002 pushj \$12,10 <a> + c: e3fd0003 setl \$253,0x3 + +0+10 <a>: + 10: e3fd0004 setl \$253,0x4 diff --git a/ld/testsuite/ld-mmix/pushja7b.d b/ld/testsuite/ld-mmix/pushja7b.d new file mode 100644 index 0000000..03c9ea9 --- /dev/null +++ b/ld/testsuite/ld-mmix/pushja7b.d @@ -0,0 +1,25 @@ +#source: start.s +#source: a.s +#source: pushja.s +#as: -x +#ld: -m mmo +#objdump: -dr + +.*: file format mmo + +Disassembly of section \.text: + +0+ <(Main|_start)>: + 0: e3fd0001 setl \$253,0x1 + +0+4 <a>: + 4: e3fd0004 setl \$253,0x4 + +0+8 <pushja>: + 8: e3fd0002 setl \$253,0x2 + c: e3ff0004 setl \$255,0x4 + 10: e6ff0000 incml \$255,0x0 + 14: e5ff0000 incmh \$255,0x0 + 18: e4ff0000 inch \$255,0x0 + 1c: bf0cff00 pushgo \$12,\$255,0 + 20: e3fd0003 setl \$253,0x3 diff --git a/ld/testsuite/ld-mmix/pushja7f.d b/ld/testsuite/ld-mmix/pushja7f.d new file mode 100644 index 0000000..e4b2c68 --- /dev/null +++ b/ld/testsuite/ld-mmix/pushja7f.d @@ -0,0 +1,25 @@ +#source: start.s +#source: pushja.s +#source: a.s +#as: -x +#ld: -m mmo +#objdump: -dr + +.*: file format mmo + +Disassembly of section \.text: + +0+ <(Main|_start)>: + 0: e3fd0001 setl \$253,0x1 + +0+4 <pushja>: + 4: e3fd0002 setl \$253,0x2 + 8: e3ff0020 setl \$255,0x20 + c: e6ff0000 incml \$255,0x0 + 10: e5ff0000 incmh \$255,0x0 + 14: e4ff0000 inch \$255,0x0 + 18: bf0cff00 pushgo \$12,\$255,0 + 1c: e3fd0003 setl \$253,0x3 + +0+20 <a>: + 20: e3fd0004 setl \$253,0x4 diff --git a/ld/testsuite/ld-mmix/pushja8b.d b/ld/testsuite/ld-mmix/pushja8b.d new file mode 100644 index 0000000..da1f216 --- /dev/null +++ b/ld/testsuite/ld-mmix/pushja8b.d @@ -0,0 +1,21 @@ +#source: start.s +#source: a.s +#source: pushja.s +#as: -no-expand +#ld: -m mmo +#objdump: -dr + +.*: file format mmo + +Disassembly of section \.text: + +0+ <(Main|_start)>: + 0: e3fd0001 setl \$253,0x1 + +0+4 <a>: + 4: e3fd0004 setl \$253,0x4 + +0+8 <pushja>: + 8: e3fd0002 setl \$253,0x2 + c: f30cfffe pushj \$12,4 <a> + 10: e3fd0003 setl \$253,0x3 diff --git a/ld/testsuite/ld-mmix/pushja8f.d b/ld/testsuite/ld-mmix/pushja8f.d new file mode 100644 index 0000000..8ae45f9 --- /dev/null +++ b/ld/testsuite/ld-mmix/pushja8f.d @@ -0,0 +1,21 @@ +#source: start.s +#source: pushja.s +#source: a.s +#as: -no-expand +#ld: -m mmo +#objdump: -dr + +.*: file format mmo + +Disassembly of section \.text: + +0+ <(Main|_start)>: + 0: e3fd0001 setl \$253,0x1 + +0+4 <pushja>: + 4: e3fd0002 setl \$253,0x2 + 8: f20c0002 pushj \$12,10 <a> + c: e3fd0003 setl \$253,0x3 + +0+10 <a>: + 10: e3fd0004 setl \$253,0x4 diff --git a/ld/testsuite/ld-mmix/reg-1.d b/ld/testsuite/ld-mmix/reg-1.d new file mode 100644 index 0000000..f904925 --- /dev/null +++ b/ld/testsuite/ld-mmix/reg-1.d @@ -0,0 +1,7 @@ +#source: areg-256.s +#source: gregget1.s +#source: start.s +#source: a.s +#as: -x +#ld: -m elf64mmix +#error: relocation truncated to fit: R_MMIX_REG areg$ diff --git a/ld/testsuite/ld-mmix/reg-1m.d b/ld/testsuite/ld-mmix/reg-1m.d new file mode 100644 index 0000000..5a1bf6b --- /dev/null +++ b/ld/testsuite/ld-mmix/reg-1m.d @@ -0,0 +1,7 @@ +#source: areg-256.s +#source: gregget1.s +#source: start.s +#source: a.s +#as: -x +#ld: -m mmo +#error: relocation truncated to fit: R_MMIX_REG areg$ diff --git a/ld/testsuite/ld-mmix/reg-2.d b/ld/testsuite/ld-mmix/reg-2.d new file mode 100644 index 0000000..09b0da4 --- /dev/null +++ b/ld/testsuite/ld-mmix/reg-2.d @@ -0,0 +1,7 @@ +#source: areg-t.s +#source: gregget1.s +#source: start.s +#source: a.s +#as: -x +#ld: -m elf64mmix +#error: register relocation against non-register symbol: areg in \.text diff --git a/ld/testsuite/ld-mmix/reg-2m.d b/ld/testsuite/ld-mmix/reg-2m.d new file mode 100644 index 0000000..f6edbef --- /dev/null +++ b/ld/testsuite/ld-mmix/reg-2m.d @@ -0,0 +1,7 @@ +#source: areg-t.s +#source: gregget1.s +#source: start.s +#source: a.s +#as: -x +#ld: -m mmo +#error: register relocation against non-register symbol: areg in \.text diff --git a/ld/testsuite/ld-mmix/regext1.s b/ld/testsuite/ld-mmix/regext1.s new file mode 100644 index 0000000..7703905 --- /dev/null +++ b/ld/testsuite/ld-mmix/regext1.s @@ -0,0 +1,2 @@ + .global ext1 +ext1 IS $252 diff --git a/ld/testsuite/ld-mmix/sec-1.d b/ld/testsuite/ld-mmix/sec-1.d new file mode 100644 index 0000000..25faec2 --- /dev/null +++ b/ld/testsuite/ld-mmix/sec-1.d @@ -0,0 +1,32 @@ +#source: sec-1.s +#source: start.s +#ld: -m elf64mmix +#objcopy_linked_file: -O mmo +#objdump: -sh + +.*: file format mmo + +Sections: +Idx Name Size VMA LMA File off Algn + 0 \.text 0+4 0+ 0+ 0+ 2\*\*2 + CONTENTS, ALLOC, LOAD, CODE + 1 \.a\.fourth\.section 0+10 0+20 0+20 0+ 2\*\*2 + CONTENTS, ALLOC, LOAD, READONLY, DATA + 2 secname 0+1c 0+4 0+4 0+ 2\*\*2 + CONTENTS, ALLOC, LOAD, READONLY, CODE + 3 anothersec 0+14 2000000000000000 2000000000000000 0+ 2\*\*2 + CONTENTS, ALLOC, LOAD, DATA + 4 thirdsec 0+c 0+ 0+ 0+ 2\*\*2 + CONTENTS, READONLY +Contents of section \.text: + 0000 e3fd0001 .* +Contents of section \.a\.fourth\.section: + 0020 00000000 0087a238 00000000 302a55a8 .* +Contents of section secname: + 0004 00000001 00000002 00000003 00000004 .* + 0014 ffffffff fffff827 50000000 .* +Contents of section anothersec: + 0000 0000000a 00000009 00000008 00000007 .* + 0010 25272900 .* +Contents of section thirdsec: + 0000 00030d41 000186a2 26280000 .* diff --git a/ld/testsuite/ld-mmix/sec-1.s b/ld/testsuite/ld-mmix/sec-1.s new file mode 100644 index 0000000..77e26e3 --- /dev/null +++ b/ld/testsuite/ld-mmix/sec-1.s @@ -0,0 +1,14 @@ + .section secname,"ax" + TETRA 1,2,3,4,-1,-2009 + BYTE 80 + + .section anothersec,"aw" + TETRA 10,9,8,7 + BYTE 37,39,41 + + .section thirdsec + TETRA 200001,100002 + BYTE 38,40 + + .section .a.fourth.section,"a" + OCTA 8888888,808080808 diff --git a/ld/testsuite/ld-mmix/sec-2.d b/ld/testsuite/ld-mmix/sec-2.d new file mode 100644 index 0000000..5bf4033 --- /dev/null +++ b/ld/testsuite/ld-mmix/sec-2.d @@ -0,0 +1,26 @@ +#source: sec-1.s +#source: start.s +#source: data1.s +#ld: -m mmo -T $srcdir/$subdir/mmosec1.ld +#objdump: -sh + +.*: file format mmo + +Sections: +Idx Name Size VMA LMA File off Algn + 0 \.text 0+4 0+100 0+100 0+ 2\*\*2 + CONTENTS, ALLOC, LOAD, CODE + 1 \.other 0+50 1000000000000000 1000000000000000 0+ 2\*\*2 + CONTENTS, ALLOC, LOAD, CODE, DATA + 2 \.data 0+4 2000000000000004 2000000000000004 0+ 2\*\*2 + CONTENTS, ALLOC, LOAD +Contents of section \.text: + 0100 e3fd0001 .* +Contents of section \.other: + 0000 00000001 00000002 00000003 00000004 .* + 0010 ffffffff fffff827 50000000 0000000a .* + 0020 00000009 00000008 00000007 25272900 .* + 0030 00030d41 000186a2 26280000 00000000 .* + 0040 00000000 0087a238 00000000 302a55a8 .* +Contents of section \.data: + 0004 0000012c .* diff --git a/ld/testsuite/ld-mmix/sec-2.s b/ld/testsuite/ld-mmix/sec-2.s new file mode 100644 index 0000000..3ac0555 --- /dev/null +++ b/ld/testsuite/ld-mmix/sec-2.s @@ -0,0 +1,2 @@ + .section .other,"ax" + TETRA 12,34,1 diff --git a/ld/testsuite/ld-mmix/sec-3.d b/ld/testsuite/ld-mmix/sec-3.d new file mode 100644 index 0000000..84b6db5 --- /dev/null +++ b/ld/testsuite/ld-mmix/sec-3.d @@ -0,0 +1,36 @@ +#source: sec-1.s +#source: start.s +#source: data1.s +#ld: -m mmo +#objdump: -sh + +.*: file format mmo + +Sections: +Idx Name Size VMA LMA File off Algn + 0 \.text 0+4 0+ 0+ 0+ 2\*\*2 + CONTENTS, ALLOC, LOAD, CODE + 1 secname 0+1c 0+4 0+4 0+ 2\*\*2 + CONTENTS, ALLOC, LOAD, READONLY, CODE + 2 \.a\.fourth\.section 0+10 0+20 0+20 0+ 2\*\*2 + CONTENTS, ALLOC, LOAD, READONLY, DATA + 3 \.data 0+4 2000000000000004 2000000000000004 0+ 2\*\*2 + CONTENTS, ALLOC, LOAD + 4 anothersec 0+14 2000000000000008 2000000000000008 0+ 2\*\*2 + CONTENTS, ALLOC, LOAD, DATA + 5 thirdsec 0+c 200000000000001c 200000000000001c 0+ 2\*\*2 + CONTENTS, READONLY +Contents of section \.text: + 0000 e3fd0001 .* +Contents of section secname: + 0004 00000001 00000002 00000003 00000004 .* + 0014 ffffffff fffff827 50000000 .* +Contents of section \.a\.fourth\.section: + 0020 00000000 0087a238 00000000 302a55a8 .* +Contents of section \.data: + 0004 0000002c .* +Contents of section anothersec: + 0008 0000000a 00000009 00000008 00000007 .* + 0018 25272900 .* +Contents of section thirdsec: + 001c 00030d41 000186a2 26280000 .* diff --git a/ld/testsuite/ld-mmix/sec-4.d b/ld/testsuite/ld-mmix/sec-4.d new file mode 100644 index 0000000..7979865 --- /dev/null +++ b/ld/testsuite/ld-mmix/sec-4.d @@ -0,0 +1,22 @@ +#source: sec-2.s +#source: start.s +#source: data1.s +#ld: -m mmo -T $srcdir/$subdir/mmosec1.ld +#objdump: -sh + +.*: file format mmo + +Sections: +Idx Name Size VMA LMA File off Algn + 0 \.text 0+4 0+100 0+100 0+ 2\*\*2 + CONTENTS, ALLOC, LOAD, CODE + 1 \.data 0+4 2000000000000004 2000000000000004 0+ 2\*\*2 + CONTENTS, ALLOC, LOAD + 2 \.other 0+c 1000000000000000 1000000000000000 0+ 2\*\*2 + CONTENTS, ALLOC, LOAD, READONLY, CODE +Contents of section \.text: + 0100 e3fd0001 .* +Contents of section \.data: + 0004 0000012c .* +Contents of section \.other: + 0000 0000000c 00000022 00000001 .* diff --git a/ld/testsuite/ld-mmix/sec-5.d b/ld/testsuite/ld-mmix/sec-5.d new file mode 100644 index 0000000..caeabaf --- /dev/null +++ b/ld/testsuite/ld-mmix/sec-5.d @@ -0,0 +1,21 @@ +#source: start.s +#ld: -m mmo -T $srcdir/$subdir/mmosec2.ld +#objdump: -sh + +# Check that sections are automatically created to cope with contents at +# unexpected addresses. We do this by linking .text at an unexpected +# address. As .text (like .data) does not get a section descriptor, the +# output gets a LOP_LOC at an unexpected address, and a unique section is +# created. This test will have to be changed if .text gets a section +# descriptor if linked to an unexpected address. + +.*: file format mmo + +Sections: +Idx Name Size VMA LMA File off Algn + 0 \.text 0+ 0+ 0+ 0+ 2\*\*2 + + 1 \.MMIX\.sec\.0 0+4 1000000000000000 1000000000000000 0+ 2\*\*2 + CONTENTS, ALLOC, LOAD +Contents of section \.MMIX\.sec\.0: + 0000 e3fd0001 .* diff --git a/ld/testsuite/ld-mmix/sec-6.d b/ld/testsuite/ld-mmix/sec-6.d new file mode 100644 index 0000000..ea4f6bc --- /dev/null +++ b/ld/testsuite/ld-mmix/sec-6.d @@ -0,0 +1,36 @@ +#source: start.s +#source: sec-6.s +#source: a.s +#as: -x +#ld: -m elf64mmix +#objcopy_linked_file: -O mmo +#objdump: -xs + +# A non-loaded section with relocs would have the SEC_RELOC bit set in the +# output if we didn't clear it. For reference, here's the ELF copied to +# mmo, so we make sure no spurious flags are introduced. + +.*: file format mmo +.* +architecture: mmix, flags 0x0+10: +HAS_SYMS +start address 0x0+ + +Sections: +Idx Name Size VMA LMA File off Algn + 0 \.text 0+8 0+ 0+ 0+ 2\*\*2 + CONTENTS, ALLOC, LOAD, CODE + 1 \.debug_frame 0+10 0+ 0+ 0+ 2\*\*2 + CONTENTS, READONLY, DEBUGGING +SYMBOL TABLE: +0+ g \.text _start +0+8 g \.text debugb +2000000000000000 g \*ABS\* __bss_start +2000000000000000 g \*ABS\* _edata +2000000000000000 g \*ABS\* _end +0+4 g \.text a + +Contents of section \.text: + 0000 e3fd0001 e3fd0004 .* +Contents of section \.debug_frame: + 0000 00000000 00000004 00000000 00000008 .* diff --git a/ld/testsuite/ld-mmix/sec-6.s b/ld/testsuite/ld-mmix/sec-6.s new file mode 100644 index 0000000..7d83883 --- /dev/null +++ b/ld/testsuite/ld-mmix/sec-6.s @@ -0,0 +1,5 @@ + .global debugb + .section .debug_frame,"",@progbits + .8byte a +debugb: + .8byte debugb diff --git a/ld/testsuite/ld-mmix/sec-6m.d b/ld/testsuite/ld-mmix/sec-6m.d new file mode 100644 index 0000000..8d12cfb --- /dev/null +++ b/ld/testsuite/ld-mmix/sec-6m.d @@ -0,0 +1,32 @@ +#source: start.s +#source: sec-6.s +#source: a.s +#as: -x +#ld: -m mmo +#objdump: -xs + +# A non-loaded section with relocs would have the SEC_RELOC bit set in the +# output if we didn't clear it. + +.*: file format mmo +.* +architecture: mmix, flags 0x0+10: +HAS_SYMS +start address 0x0+ + +Sections: +Idx Name Size VMA LMA File off Algn + 0 \.text 0+8 0+ 0+ 0+ 2\*\*2 + CONTENTS, ALLOC, LOAD, CODE + 1 \.debug_frame 0+10 0+ 0+ 0+ 2\*\*2 + CONTENTS, READONLY, DEBUGGING +SYMBOL TABLE: +0+ g \.text Main +0+ g \.text _start +0+8 g \.text debugb +0+4 g \.text a + +Contents of section \.text: + 0000 e3fd0001 e3fd0004 .* +Contents of section \.debug_frame: + 0000 00000000 00000004 00000000 00000008 .* diff --git a/ld/testsuite/ld-mmix/spec801.d b/ld/testsuite/ld-mmix/spec801.d new file mode 100644 index 0000000..27918e9 --- /dev/null +++ b/ld/testsuite/ld-mmix/spec801.d @@ -0,0 +1,21 @@ +#source: bspec801.s +#source: start.s +#ld: -m mmo +#objdump: -sh + +# Check exceptional cases for LOP_SPEC 80, which we parse according to a +# specific format: see documentation and mmo.c +# #1: name length has LOP_QUOTE. + +.*: file format mmo + +Sections: +Idx Name Size VMA LMA File off Algn + 0 \.text 00000004 0000000000000000 0000000000000000 00000000 2\*\*2 + CONTENTS, ALLOC, LOAD, CODE + 1 \.MMIX\.spec_data\.80 00000004 0000000000000000 0000000000000000 00000000 2\*\*2 + CONTENTS +Contents of section \.text: + 0000 e3fd0001 .* +Contents of section \.MMIX\.spec_data\.80: + 0000 98000001 .* diff --git a/ld/testsuite/ld-mmix/spec802.d b/ld/testsuite/ld-mmix/spec802.d new file mode 100644 index 0000000..d5c8f4e --- /dev/null +++ b/ld/testsuite/ld-mmix/spec802.d @@ -0,0 +1,24 @@ +#source: bspec802.s +#source: start.s +#ld: -m mmo +#objdump: -sh + +# See spec801.d. +# #2: non-quote LOP in name. + +.*: file format mmo + +Sections: +Idx Name Size VMA LMA File off Algn + 0 \.text 0+4 0+ 0+ 0+ 2\*\*2 + CONTENTS, ALLOC, LOAD, CODE + 1 \.data 0+4 2000000000000000 2000000000000000 0+ 2\*\*2 + CONTENTS, ALLOC, LOAD + 2 \.MMIX\.spec_data\.80 0+4 0+ 0+ 0+ 2\*\*2 + CONTENTS +Contents of section \.text: + 0000 e3fd0001 .* +Contents of section \.data: + 0000 00112233 .* +Contents of section \.MMIX\.spec_data\.80: + 0000 00000004 .* diff --git a/ld/testsuite/ld-mmix/spec803.d b/ld/testsuite/ld-mmix/spec803.d new file mode 100644 index 0000000..d81d5a6 --- /dev/null +++ b/ld/testsuite/ld-mmix/spec803.d @@ -0,0 +1,24 @@ +#source: bspec803.s +#source: start.s +#ld: -m mmo +#objdump: -sh + +# See spec801.d. +# #3: LOP_QUOTE in name and non-quote LOP in section flags. + +.*: file format mmo + +Sections: +Idx Name Size VMA LMA File off Algn + 0 \.text 0+4 0+ 0+ 0+ 2\*\*2 + CONTENTS, ALLOC, LOAD, CODE + 1 \.data 0+4 2000000000000000 2000000000000000 0+ 2\*\*2 + CONTENTS, ALLOC, LOAD + 2 \.MMIX\.spec_data\.80 0+c 0+ 0+ 0+ 2\*\*2 + CONTENTS +Contents of section \.text: + 0000 e3fd0001 .* +Contents of section \.data: + 0000 00112233 .* +Contents of section \.MMIX\.spec_data\.80: + 0000 00000002 61616161 98616161 .* diff --git a/ld/testsuite/ld-mmix/spec804.d b/ld/testsuite/ld-mmix/spec804.d new file mode 100644 index 0000000..db13299 --- /dev/null +++ b/ld/testsuite/ld-mmix/spec804.d @@ -0,0 +1,24 @@ +#source: bspec804.s +#source: start.s +#ld: -m mmo +#objdump: -sh + +# See spec801.d. +# #4: non-quote LOP in section length, high part. + +.*: file format mmo + +Sections: +Idx Name Size VMA LMA File off Algn + 0 \.text 0+4 0+ 0+ 0+ 2\*\*2 + CONTENTS, ALLOC, LOAD, CODE + 1 \.data 0+4 2000000000000000 2000000000000000 0+ 2\*\*2 + CONTENTS, ALLOC, LOAD + 2 \.MMIX\.spec_data\.80 0+10 0+ 0+ 0+ 2\*\*2 + CONTENTS +Contents of section \.text: + 0000 e3fd0001 .* +Contents of section \.data: + 0000 00112233 .* +Contents of section \.MMIX\.spec_data\.80: + 0000 00000002 61616161 61616161 00000011 .* diff --git a/ld/testsuite/ld-mmix/spec805.d b/ld/testsuite/ld-mmix/spec805.d new file mode 100644 index 0000000..fd47e1c --- /dev/null +++ b/ld/testsuite/ld-mmix/spec805.d @@ -0,0 +1,25 @@ +#source: bspec805.s +#source: start.s +#ld: -m mmo +#objdump: -sh + +# See spec801.d. +# #5: non-quote LOP in section length, low part. + +.*: file format mmo + +Sections: +Idx Name Size VMA LMA File off Algn + 0 \.text 0+4 0+ 0+ 0+ 2\*\*2 + CONTENTS, ALLOC, LOAD, CODE + 1 \.data 0+4 2000000000000000 2000000000000000 0+ 2\*\*2 + CONTENTS, ALLOC, LOAD + 2 \.MMIX\.spec_data\.80 0+14 0+ 0+ 0+ 2\*\*2 + CONTENTS +Contents of section \.text: + 0000 e3fd0001 .* +Contents of section \.data: + 0000 00112233 .* +Contents of section \.MMIX\.spec_data\.80: + 0000 00000002 61616161 61616161 00000011 .* + 0010 00000000 .* diff --git a/ld/testsuite/ld-mmix/spec806.d b/ld/testsuite/ld-mmix/spec806.d new file mode 100644 index 0000000..5679c73 --- /dev/null +++ b/ld/testsuite/ld-mmix/spec806.d @@ -0,0 +1,25 @@ +#source: bspec806.s +#source: start.s +#ld: -m mmo +#objdump: -sh + +# See spec801.d. +# #6: non-quote LOP in section vma, high part. + +.*: file format mmo + +Sections: +Idx Name Size VMA LMA File off Algn + 0 \.text 0+4 0+ 0+ 0+ 2\*\*2 + CONTENTS, ALLOC, LOAD, CODE + 1 \.data 0+4 2000000000000000 2000000000000000 0+ 2\*\*2 + CONTENTS, ALLOC, LOAD + 2 \.MMIX\.spec_data\.80 0+18 0+ 0+ 0+ 2\*\*2 + CONTENTS +Contents of section \.text: + 0000 e3fd0001 .* +Contents of section \.data: + 0000 00112233 .* +Contents of section \.MMIX\.spec_data\.80: + 0000 00000002 61616161 61616161 00000011 .* + 0010 00000000 0000000c .* diff --git a/ld/testsuite/ld-mmix/spec807.d b/ld/testsuite/ld-mmix/spec807.d new file mode 100644 index 0000000..1cfdf9e --- /dev/null +++ b/ld/testsuite/ld-mmix/spec807.d @@ -0,0 +1,25 @@ +#source: bspec807.s +#source: start.s +#ld: -m mmo +#objdump: -sh + +# See spec801.d. +# #7: non-quote LOP in section vma, low part. + +.*: file format mmo + +Sections: +Idx Name Size VMA LMA File off Algn + 0 \.text 0+4 0+ 0+ 0+ 2\*\*2 + CONTENTS, ALLOC, LOAD, CODE + 1 \.data 0+4 2000000000000000 2000000000000000 0+ 2\*\*2 + CONTENTS, ALLOC, LOAD + 2 \.MMIX\.spec_data\.80 0+1c 0+ 0+ 0+ 2\*\*2 + CONTENTS +Contents of section \.text: + 0000 e3fd0001 .* +Contents of section \.data: + 0000 00112233 .* +Contents of section \.MMIX\.spec_data\.80: + 0000 00000002 61616161 61616161 00000011 .* + 0010 00000000 0000000c 00000000 .* diff --git a/ld/testsuite/ld-mmix/spec808.d b/ld/testsuite/ld-mmix/spec808.d new file mode 100644 index 0000000..fb2ccd1 --- /dev/null +++ b/ld/testsuite/ld-mmix/spec808.d @@ -0,0 +1,25 @@ +#source: bspec808.s +#source: start.s +#ld: -m mmo +#objdump: -sh + +# See spec801.d. +# #8: Indecent section length. + +.*: file format mmo + +Sections: +Idx Name Size VMA LMA File off Algn + 0 \.text 0+4 0+ 0+ 0+ 2\*\*2 + CONTENTS, ALLOC, LOAD, CODE + 1 \.data 0+4 2000000000000000 2000000000000000 0+ 2\*\*2 + CONTENTS, ALLOC, LOAD + 2 \.MMIX\.spec_data\.80 0+20 0+ 0+ 0+ 2\*\*2 + CONTENTS +Contents of section \.text: + 0000 e3fd0001 .* +Contents of section \.data: + 0000 00112233 .* +Contents of section \.MMIX\.spec_data\.80: + 0000 00000002 61616161 61616161 00000011 .* + 0010 0000ff00 00000000 000000ff 00000000 .* diff --git a/ld/testsuite/ld-mmix/start-1.d b/ld/testsuite/ld-mmix/start-1.d new file mode 100644 index 0000000..8a7162f --- /dev/null +++ b/ld/testsuite/ld-mmix/start-1.d @@ -0,0 +1,27 @@ +#source: start2.s +#ld: -m elf64mmix +#objdump: -td + +.*: file format elf64-mmix + +SYMBOL TABLE: +0+ l d \.text 0+ +2000000000000000 l d \.data 0+ +2000000000000000 l d \.sbss 0+ +2000000000000000 l d \.bss 0+ +0+ l d \*ABS\* 0+ +0+ l d \*ABS\* 0+ +0+ l d \*ABS\* 0+ +0+4 g \.text 0+ _start +2000000000000000 g O \*ABS\* 0+ __bss_start +2000000000000000 g O \*ABS\* 0+ _edata +2000000000000000 g O \*ABS\* 0+ _end +0+4 g O \.text 0+ _start\. + +Disassembly of section \.text: + +0+ <_start-0x4>: + 0: fd000001 swym 0,0,1 + +0+4 <_start>: + 4: fd000002 swym 0,0,2 diff --git a/ld/testsuite/ld-mmix/start-2.d b/ld/testsuite/ld-mmix/start-2.d new file mode 100644 index 0000000..e380dc0 --- /dev/null +++ b/ld/testsuite/ld-mmix/start-2.d @@ -0,0 +1,4 @@ +#source: main1.s +#source: a.s +#ld: -m mmo -e a +#error: Bad symbol definition: `Main' set to diff --git a/ld/testsuite/ld-mmix/start.s b/ld/testsuite/ld-mmix/start.s new file mode 100644 index 0000000..b2e3c85 --- /dev/null +++ b/ld/testsuite/ld-mmix/start.s @@ -0,0 +1,5 @@ +* Just a start symbol and some non-NOP padding. + .text + .global _start +_start: + SET $253,1 diff --git a/ld/testsuite/ld-mmix/start2.s b/ld/testsuite/ld-mmix/start2.s new file mode 100644 index 0000000..3398788 --- /dev/null +++ b/ld/testsuite/ld-mmix/start2.s @@ -0,0 +1,5 @@ + .text + SWYM 1 + .global _start +_start: + SWYM 2 diff --git a/ld/testsuite/ld-mmix/sym-1.d b/ld/testsuite/ld-mmix/sym-1.d new file mode 100644 index 0000000..64d6376 --- /dev/null +++ b/ld/testsuite/ld-mmix/sym-1.d @@ -0,0 +1,11 @@ +#source: start.s +#source: a.s +#ld: -m mmo +#nm: -n + +# Test that nm can grok a simple mmo symbol table (or that mmo lets nm +# grok it). + +0+ T Main +0+ T _start +0+4 T a diff --git a/ld/testsuite/ld-mmix/sym-2.d b/ld/testsuite/ld-mmix/sym-2.d new file mode 100644 index 0000000..61bae32 --- /dev/null +++ b/ld/testsuite/ld-mmix/sym-2.d @@ -0,0 +1,142 @@ +#source: start.s +#source: sym-2.s +#source: a.s +#as: -globalize-symbols +#ld: -m mmo +#objcopy_linked_file: +#objdump: -t + +.*: file format mmo + +SYMBOL TABLE: +0+ g[ ]+\.text Main +0+4 g[ ]+\.text a40 +0+4 g[ ]+\.text a33 +0+4 g[ ]+\.text a45 +0+4 g[ ]+\.text a21 +0+4 g[ ]+\.text a99 +0+4 g[ ]+\.text a114 +0+4 g[ ]+\.text a122 +0+4 g[ ]+\.text a73 +0+4 g[ ]+\.text a111 +0+4 g[ ]+\.text a109 +0+4 g[ ]+\.text a65 +0+4 g[ ]+\.text a28 +0+4 g[ ]+\.text a30 +0+4 g[ ]+\.text a10 +0+4 g[ ]+\.text a103 +0+4 g[ ]+\.text a42 +0+4 g[ ]+\.text a62 +0+4 g[ ]+\.text a25 +0+4 g[ ]+\.text a128 +0+4 g[ ]+\.text a9 +0+4 g[ ]+\.text a11 +0+4 g[ ]+\.text a81 +0+4 g[ ]+\.text a55 +0+4 g[ ]+\.text a88 +0+4 g[ ]+\.text a100 +0+4 g[ ]+\.text a104 +0+4 g[ ]+\.text a8 +0+4 g[ ]+\.text a86 +0+4 g[ ]+\.text a91 +0+4 g[ ]+\.text a1 +0+4 g[ ]+\.text a49 +0+4 g[ ]+\.text a43 +0+4 g[ ]+\.text a56 +0+4 g[ ]+\.text a116 +0+4 g[ ]+\.text a124 +0+4 g[ ]+\.text a98 +0+4 g[ ]+\.text a117 +0+4 g[ ]+\.text a80 +0+4 g[ ]+\.text a121 +0+4 g[ ]+\.text a36 +0+4 g[ ]+\.text a75 +0+4 g[ ]+\.text a48 +0+4 g[ ]+\.text a3 +0+4 g[ ]+\.text a63 +0+4 g[ ]+\.text a26 +0+4 g[ ]+\.text a78 +0+4 g[ ]+\.text a61 +0+4 g[ ]+\.text a24 +0+4 g[ ]+\.text a64 +0+4 g[ ]+\.text a27 +0+4 g[ ]+\.text a83 +0+4 g[ ]+\.text a57 +0+4 g[ ]+\.text a123 +0+4 g[ ]+\.text a34 +0+4 g[ ]+\.text a12 +0+4 g[ ]+\.text a14 +0+4 g[ ]+\.text a70 +0+4 g[ ]+\.text a39 +0+4 g[ ]+\.text a82 +0+4 g[ ]+\.text a102 +0+4 g[ ]+\.text a106 +0+4 g[ ]+\.text a110 +0+ g[ ]+\.text _start +0+4 g[ ]+\.text a41 +0+4 g[ ]+\.text a85 +0+4 g[ ]+\.text a58 +0+4 g[ ]+\.text a89 +0+4 g[ ]+\.text a54 +0+4 g[ ]+\.text a19 +0+4 g[ ]+\.text a93 +0+4 g[ ]+\.text a126 +0+4 g[ ]+\.text a22 +0+4 g[ ]+\.text a96 +0+4 g[ ]+\.text a7 +0+4 g[ ]+\.text a35 +0+4 g[ ]+\.text a31 +0+4 g[ ]+\.text a5 +0+4 g[ ]+\.text a44 +0+4 g[ ]+\.text a105 +0+4 g[ ]+\.text a90 +0+4 g[ ]+\.text a97 +0+4 g[ ]+\.text a92 +0+4 g[ ]+\.text a2 +0+4 g[ ]+\.text a120 +0+4 g[ ]+\.text a113 +0+4 g[ ]+\.text a77 +0+4 g[ ]+\.text a125 +0+4 g[ ]+\.text a118 +0+4 g[ ]+\.text a32 +0+4 g[ ]+\.text a108 +0+4 g[ ]+\.text a47 +0+4 g[ ]+\.text a112 +0+4 g[ ]+\.text a59 +0+4 g[ ]+\.text a87 +0+4 g[ ]+\.text a94 +0+4 g[ ]+\.text a20 +0+4 g[ ]+\.text a51 +0+4 g[ ]+\.text a16 +0+4 g[ ]+\.text a53 +0+4 g[ ]+\.text a18 +0+4 g[ ]+\.text a66 +0+4 g[ ]+\.text a29 +0+4 g[ ]+\.text a72 +0+4 g[ ]+\.text a79 +0+4 g[ ]+\.text a74 +0+4 g[ ]+\.text a68 +0+4 g[ ]+\.text a95 +0+4 g[ ]+\.text a60 +0+4 g[ ]+\.text a23 +0+4 g[ ]+\.text a67 +0+4 g[ ]+\.text a +0+4 g[ ]+\.text a38 +0+4 g[ ]+\.text a107 +0+4 g[ ]+\.text a127 +0+4 g[ ]+\.text a101 +0+4 g[ ]+\.text a115 +0+4 g[ ]+\.text a71 +0+4 g[ ]+\.text a84 +0+4 g[ ]+\.text a69 +0+4 g[ ]+\.text a37 +0+4 g[ ]+\.text a76 +0+4 g[ ]+\.text a52 +0+4 g[ ]+\.text a17 +0+4 g[ ]+\.text a13 +0+4 g[ ]+\.text a50 +0+4 g[ ]+\.text a15 +0+4 g[ ]+\.text a119 +0+4 g[ ]+\.text a6 +0+4 g[ ]+\.text a46 +0+4 g[ ]+\.text a4 diff --git a/ld/testsuite/ld-mmix/sym-2.s b/ld/testsuite/ld-mmix/sym-2.s new file mode 100644 index 0000000..c8df27e --- /dev/null +++ b/ld/testsuite/ld-mmix/sym-2.s @@ -0,0 +1,130 @@ +% Just 128 symbols to test that we can handle it in mmo. Assemble it with +% -globalize-symbols. +a1: +a2: +a3: +a4: +a5: +a6: +a7: +a8: +a9: +a10: +a11: +a12: +a13: +a14: +a15: +a16: +a17: +a18: +a19: +a20: +a21: +a22: +a23: +a24: +a25: +a26: +a27: +a28: +a29: +a30: +a31: +a32: +a33: +a34: +a35: +a36: +a37: +a38: +a39: +a40: +a41: +a42: +a43: +a44: +a45: +a46: +a47: +a48: +a49: +a50: +a51: +a52: +a53: +a54: +a55: +a56: +a57: +a58: +a59: +a60: +a61: +a62: +a63: +a64: +a65: +a66: +a67: +a68: +a69: +a70: +a71: +a72: +a73: +a74: +a75: +a76: +a77: +a78: +a79: +a80: +a81: +a82: +a83: +a84: +a85: +a86: +a87: +a88: +a89: +a90: +a91: +a92: +a93: +a94: +a95: +a96: +a97: +a98: +a99: +a100: +a101: +a102: +a103: +a104: +a105: +a106: +a107: +a108: +a109: +a110: +a111: +a112: +a113: +a114: +a115: +a116: +a117: +a118: +a119: +a120: +a121: +a122: +a123: +a124: +a125: +a126: +a127: +a128: diff --git a/ld/testsuite/ld-mmix/undef-1.d b/ld/testsuite/ld-mmix/undef-1.d new file mode 100644 index 0000000..fb8c7ee --- /dev/null +++ b/ld/testsuite/ld-mmix/undef-1.d @@ -0,0 +1,4 @@ +#source: undef-1.s +#source: start.s +#ld: -m elf64mmix +#error: undefined reference to `regvar' diff --git a/ld/testsuite/ld-mmix/undef-1.s b/ld/testsuite/ld-mmix/undef-1.s new file mode 100644 index 0000000..668cd15 --- /dev/null +++ b/ld/testsuite/ld-mmix/undef-1.s @@ -0,0 +1 @@ + ADDU regvar,$8,$9 diff --git a/ld/testsuite/ld-mmix/undef-1m.d b/ld/testsuite/ld-mmix/undef-1m.d new file mode 100644 index 0000000..001d7f6 --- /dev/null +++ b/ld/testsuite/ld-mmix/undef-1m.d @@ -0,0 +1,4 @@ +#source: undef-1.s +#source: start.s +#ld: -m mmo +#error: undefined reference to `regvar' diff --git a/ld/testsuite/ld-mmix/undef-2.d b/ld/testsuite/ld-mmix/undef-2.d new file mode 100644 index 0000000..52844db --- /dev/null +++ b/ld/testsuite/ld-mmix/undef-2.d @@ -0,0 +1,5 @@ +#source: undef-2.s +#source: start.s +#as: -x +#ld: -m elf64mmix +#error: undefined reference to `undefd' diff --git a/ld/testsuite/ld-mmix/undef-2.s b/ld/testsuite/ld-mmix/undef-2.s new file mode 100644 index 0000000..d912b15 --- /dev/null +++ b/ld/testsuite/ld-mmix/undef-2.s @@ -0,0 +1 @@ + PUSHJ $5,undefd diff --git a/ld/testsuite/ld-mmix/undef-2m.d b/ld/testsuite/ld-mmix/undef-2m.d new file mode 100644 index 0000000..aa0becc --- /dev/null +++ b/ld/testsuite/ld-mmix/undef-2m.d @@ -0,0 +1,5 @@ +#source: undef-2.s +#source: start.s +#as: -x +#ld: -m mmo +#error: undefined reference to `undefd' diff --git a/ld/testsuite/ld-mmix/undef-3.d b/ld/testsuite/ld-mmix/undef-3.d new file mode 100644 index 0000000..35ec2e6 --- /dev/null +++ b/ld/testsuite/ld-mmix/undef-3.d @@ -0,0 +1,46 @@ +#source: start.s +#ld: -u undefd -m elf64mmix +#readelf: -S -s + +There are 8 section headers, starting at offset 0xe8: + +Section Headers: + \[Nr\] Name Type Address Offset + Size EntSize Flags Link Info Align + \[ 0\] NULL 0+ 0+ + 0+ 0+ 0 0 0 + \[ 1\] \.text PROGBITS 0+ 0+b0 + 0+4 0+ AX 0 0 4 + \[ 2\] \.data PROGBITS 20+ 0+b4 + 0+ 0+ WA 0 0 1 + \[ 3\] \.sbss PROGBITS 2000000000000000 0+b4 + 0+ 0+ W 0 0 1 + \[ 4\] \.bss NOBITS 2000000000000000 0+b4 + 0+ 0+ WA 0 0 1 + \[ 5\] \.shstrtab STRTAB 0+ 0+b4 + 0+32 0+ 0 0 1 + \[ 6\] \.symtab SYMTAB 0+ 0+2e8 + 0+150 0+18 7 8 8 + \[ 7\] \.strtab STRTAB 0+ 0+438 + 0+2f 0+ 0 0 1 +Key to Flags: + W \(write\), A \(alloc\), X \(execute\), M \(merge\), S \(strings\) + I \(info\), L \(link order\), G \(group\), x \(unknown\) + O \(extra OS processing required\) o \(OS specific\), p \(processor specific\) + +Symbol table '\.symtab' contains 14 entries: + Num: Value Size Type Bind Vis Ndx Name + 0: 0+ 0 NOTYPE LOCAL DEFAULT UND + 1: 0+ 0 SECTION LOCAL DEFAULT 1 + 2: 2000000000000000 0 SECTION LOCAL DEFAULT 2 + 3: 2000000000000000 0 SECTION LOCAL DEFAULT 3 + 4: 2000000000000000 0 SECTION LOCAL DEFAULT 4 + 5: 0+ 0 SECTION LOCAL DEFAULT 5 + 6: 0+ 0 SECTION LOCAL DEFAULT 6 + 7: 0+ 0 SECTION LOCAL DEFAULT 7 + 8: 0+ 0 NOTYPE GLOBAL DEFAULT UND undefd + 9: 0+ 0 NOTYPE GLOBAL DEFAULT 1 _start + 10: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS __bss_start + 11: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS _edata + 12: 2000000000000000 0 OBJECT GLOBAL DEFAULT ABS _end + 13: 0+ 0 OBJECT GLOBAL DEFAULT 1 _start\. diff --git a/ld/testsuite/ld-mmix/undef-3m.d b/ld/testsuite/ld-mmix/undef-3m.d new file mode 100644 index 0000000..60752dc --- /dev/null +++ b/ld/testsuite/ld-mmix/undef-3m.d @@ -0,0 +1,20 @@ +#source: start.s +#ld: -m mmo -u undefd +#objdump: -x + +.*: file format mmo +.* +architecture: mmix, flags 0x0+10: +HAS_SYMS +start address 0x0+ + +Sections: +Idx Name Size VMA LMA File off Algn + 0 \.text 0+4 0+ 0+ 0+ 2\*\*2 + CONTENTS, ALLOC, LOAD, CODE +SYMBOL TABLE: +0+ g \.text Main +0+ g \*UND\* undefd +0+ g \.text _start + + diff --git a/ld/testsuite/ld-mmix/x.s b/ld/testsuite/ld-mmix/x.s new file mode 100644 index 0000000..faf4073 --- /dev/null +++ b/ld/testsuite/ld-mmix/x.s @@ -0,0 +1,26 @@ +;# Main file, x.s, with the program (_start) referring to two +;# linkonce functions fn and fn2. The functions fn and fn2 are +;# supposed to be equivalent of C++ template instantiations; the +;# main file instantiates fn. There's the equivalent of an FDE +;# entry in .eh_frame, referring to fn via a local label. + + .text + .global _start +_start: + .long fn + .long fn2 + + .section .gnu.linkonce.t.fn,"ax",@progbits + .weak fn + .type fn,@function +fn: +L:a: + .long 1 + .long 2 +L:b: + .size fn,L:b-L:a + + .section .eh_frame,"aw",@progbits + .long 2 + .long L:a + .long L:b-L:a diff --git a/ld/testsuite/ld-mmix/y.s b/ld/testsuite/ld-mmix/y.s new file mode 100644 index 0000000..fcfcd35 --- /dev/null +++ b/ld/testsuite/ld-mmix/y.s @@ -0,0 +1,33 @@ +;# Library file y.s has linkonce entries for fn and fn2. Note +;# that this version of fn has different code, as if compiled +;# with different optimization flags than the one in x.s (not +;# important for this test, though). The reference from +;# .eh_frame to the linkonce-excluded fn2 must be zero, or g++ +;# EH will not work. + + .section .gnu.linkonce.t.fn2,"ax",@progbits + .weak fn2 + .type fn2,@function +fn2: +L:c: + .long 3 +L:d: + .size fn2,L:d-L:c + + .section .gnu.linkonce.t.fn,"ax",@progbits + .weak fn + .type fn,@function +fn: +L:e: + .long 4 +L:f: + .size fn,L:f-L:e + + .section .eh_frame,"aw",@progbits + .long 7 + .long L:c + .long L:d-L:c + + .long 0x6066 + .long L:e + .long L:f-L:e diff --git a/ld/testsuite/ld-mmix/zeroeh.ld b/ld/testsuite/ld-mmix/zeroeh.ld new file mode 100644 index 0000000..6550c17 --- /dev/null +++ b/ld/testsuite/ld-mmix/zeroeh.ld @@ -0,0 +1,4 @@ +SECTIONS { + .text 0xa00 : { *(.text); *(.gnu.linkonce.t.*) } + .eh_frame 0x2000 : { *(.eh_frame) } +} diff --git a/ld/testsuite/ld-mmix/zeroehelf.d b/ld/testsuite/ld-mmix/zeroehelf.d new file mode 100644 index 0000000..ba17314 --- /dev/null +++ b/ld/testsuite/ld-mmix/zeroehelf.d @@ -0,0 +1,17 @@ +#source: x.s +#source: y.s +#ld: -m elf64mmix -Ttext 0xa00 -T $srcdir/$subdir/zeroeh.ld +#objdump: -s + +# The word at address 201c, for the linkonce-excluded section, must be zero. + +.*: file format elf64-mmix + +Contents of section \.text: + 0a00 00000a08 00000a10 00000001 00000002 .* + 0a10 00000003 .* +Contents of section \.eh_frame: + 2000 00000002 00000a08 00000008 00000007 .* + 2010 00000a10 00000004 00006066 00000000 .* + 2020 00000004 .* +#pass diff --git a/ld/testsuite/ld-mmix/zeroehmmo.d b/ld/testsuite/ld-mmix/zeroehmmo.d new file mode 100644 index 0000000..2c47ff1 --- /dev/null +++ b/ld/testsuite/ld-mmix/zeroehmmo.d @@ -0,0 +1,16 @@ +#source: x.s +#source: y.s +#ld: -m mmo -Ttext 0xa00 -T $srcdir/$subdir/zeroeh.ld +#objdump: -s + +# The word at address 201c, for the linkonce-excluded section, must be zero. + +.*: file format mmo + +Contents of section \.text: + 0a00 00000a08 00000a10 00000001 00000002 .* + 0a10 00000003 .* +Contents of section \.eh_frame: + 2000 00000002 00000a08 00000008 00000007 .* + 2010 00000a10 00000004 00006066 00000000 .* + 2020 00000004 .* |