diff --recursive --new-file -u ../dist-src/bfd/Makefile.in ./bfd/Makefile.in --- ../dist-src/bfd/Makefile.in Wed Apr 30 09:55:44 1997 +++ ./bfd/Makefile.in Sun May 11 14:05:40 1997 @@ -253,6 +253,7 @@ pe-ppc.o \ pei-ppc.o \ ppcboot.o \ + prc.o \ reloc16.o \ riscix.o \ sparclinux.o \ @@ -350,6 +351,7 @@ pe-ppc.c \ pei-ppc.c \ ppcboot.c \ + prc.c \ reloc16.c \ riscix.c \ sparclinux.c \ diff --recursive --new-file -u ../dist-src/bfd/config.bfd ./bfd/config.bfd --- ../dist-src/bfd/config.bfd Wed Apr 30 09:55:55 1997 +++ ./bfd/config.bfd Sun May 11 14:05:40 1997 @@ -266,7 +266,7 @@ ;; m68*-*-coff* | m68*-*-sysv* | m68*-*-rtems*) targ_defvec=m68kcoff_vec - targ_selvecs="m68kcoff_vec versados_vec ieee_vec" + targ_selvecs="m68kcoff_vec versados_vec ieee_vec prc_vec" ;; m68*-*-hpux*) targ_defvec=hp300hpux_vec diff --recursive --new-file -u ../dist-src/bfd/configure ./bfd/configure --- ../dist-src/bfd/configure Wed Apr 30 09:55:55 1997 +++ ./bfd/configure Sun May 11 14:05:58 1997 @@ -1,7 +1,7 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.12 +# Generated automatically using autoconf version 2.9 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation @@ -59,8 +59,6 @@ # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 ac_prev= for ac_option @@ -342,7 +340,7 @@ verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.12" + echo "configure generated by autoconf version 2.9" exit 0 ;; -with-* | --with-*) @@ -444,14 +442,11 @@ done # NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi +# Only set LANG and LC_ALL to C if already set. +# These must not be set unconditionally because not all systems understand +# e.g. LANG=C (notably SCO). if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi +if test "${LANG+set}" = set; then LANG=C; export LANG; fi # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h @@ -513,7 +508,6 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. @@ -630,7 +624,6 @@ fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:634: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -645,13 +638,12 @@ esac host=`$ac_config_sub $host_alias` -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` +host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` +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:655: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -663,13 +655,12 @@ esac target=`$ac_config_sub $target_alias` -target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` +target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` +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:673: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -681,9 +672,9 @@ esac build=`$ac_config_sub $build_alias` -build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` +build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` +build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` echo "$ac_t""$build" 1>&6 test "$host_alias" != "$target_alias" && @@ -737,7 +728,6 @@ # 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:741: 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 @@ -766,7 +756,6 @@ # 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:770: 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 @@ -813,47 +802,7 @@ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:818: 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. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; 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 - ac_cv_prog_cc_cross=no - else - ac_cv_prog_cc_cross=yes - fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no -fi -rm -fr conftest* - -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -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:852: 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:857: 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 @@ -862,7 +811,7 @@ yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:866: \"$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:815: \"$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 @@ -870,34 +819,29 @@ fi echo "$ac_t""$ac_cv_prog_gcc" 1>&6 - if test $ac_cv_prog_gcc = yes; then GCC=yes - 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:881: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + if test "${CFLAGS+set}" != set; then + echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_cc_g=yes + ac_cv_prog_gcc_g=yes else - ac_cv_prog_cc_g=no + ac_cv_prog_gcc_g=no fi rm -f conftest* fi -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 - if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" - elif test $ac_cv_prog_cc_g = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-O2" +echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6 + if test $ac_cv_prog_gcc_g = yes; then + CFLAGS="-g -O" + else + CFLAGS="-O" + fi fi else GCC= @@ -906,7 +850,6 @@ echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:910: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then @@ -940,7 +883,6 @@ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:944: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -971,7 +913,6 @@ # 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:975: 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 @@ -1002,7 +943,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:1006: 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 @@ -1044,12 +984,11 @@ # 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:1048: 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 else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do # Account for people who put trailing slashes in PATH elements. case "$ac_dir/" in @@ -1072,7 +1011,7 @@ ;; esac done - IFS="$ac_save_IFS" + IFS="$ac_save_ifs" fi if test "${ac_cv_path_install+set}" = set; then @@ -1152,7 +1091,6 @@ echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1156: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1167,37 +1105,33 @@ # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : else echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1194: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : else echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 rm -rf conftest* CPP=/lib/cpp fi @@ -1214,27 +1148,24 @@ for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +ac_safe=`echo "$ac_hdr" | tr './\055' '___'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1220: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi @@ -1242,7 +1173,7 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` cat >> confdefs.h <&6 -echo "configure:1260: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi @@ -1282,7 +1210,7 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` cat >> confdefs.h <&6 -echo "configure:1297: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include #include -int main() { +int main() { return 0; } +int t() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:1311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_header_time=no fi rm -f conftest* + fi echo "$ac_t""$ac_cv_header_time" 1>&6 @@ -1330,22 +1257,20 @@ for ac_func in fcntl getpagesize setitimer sysconf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1334: 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 < /* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func(); -int main() { +int main() { return 0; } +int t() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named @@ -1358,18 +1283,16 @@ ; return 0; } EOF -if { (eval echo configure:1362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* -fi +fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` @@ -1393,12 +1316,11 @@ esac echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 -echo "configure:1397: 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 < @@ -1415,20 +1337,20 @@ #ifdef HAVE_UNISTD_H #include #endif -int main() { +int main() { return 0; } +int t() { char *(*pfn) = (char *(*)) strstr ; return 0; } EOF -if { (eval echo configure:1423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_strstr=no else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 rm -rf conftest* bfd_cv_decl_needed_strstr=yes fi rm -f conftest* + fi echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6 @@ -1441,12 +1363,11 @@ fi echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 -echo "configure:1445: checking whether malloc must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -1463,20 +1384,20 @@ #ifdef HAVE_UNISTD_H #include #endif -int main() { +int main() { return 0; } +int t() { char *(*pfn) = (char *(*)) malloc ; return 0; } EOF -if { (eval echo configure:1471: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_malloc=no else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 rm -rf conftest* bfd_cv_decl_needed_malloc=yes fi rm -f conftest* + fi echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6 @@ -1489,12 +1410,11 @@ fi echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 -echo "configure:1493: checking whether realloc must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -1511,20 +1431,20 @@ #ifdef HAVE_UNISTD_H #include #endif -int main() { +int main() { return 0; } +int t() { char *(*pfn) = (char *(*)) realloc ; return 0; } EOF -if { (eval echo configure:1519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_realloc=no else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 rm -rf conftest* bfd_cv_decl_needed_realloc=yes fi rm -f conftest* + fi echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6 @@ -1537,12 +1457,11 @@ fi echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 -echo "configure:1541: 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 < @@ -1559,20 +1478,20 @@ #ifdef HAVE_UNISTD_H #include #endif -int main() { +int main() { return 0; } +int t() { char *(*pfn) = (char *(*)) free ; return 0; } EOF -if { (eval echo configure:1567: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_free=no else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 rm -rf conftest* bfd_cv_decl_needed_free=yes fi rm -f conftest* + fi echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6 @@ -1585,12 +1504,11 @@ fi echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6 -echo "configure:1589: 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 < @@ -1607,20 +1525,20 @@ #ifdef HAVE_UNISTD_H #include #endif -int main() { +int main() { return 0; } +int t() { char *(*pfn) = (char *(*)) getenv ; return 0; } EOF -if { (eval echo configure:1615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_getenv=no else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 rm -rf conftest* bfd_cv_decl_needed_getenv=yes fi rm -f conftest* + fi echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6 @@ -1883,28 +1801,27 @@ # Define HAVE_SYS_PROCFS_H if the file exists and defines # prstatus_t. echo $ac_n "checking for sys/procfs.h""... $ac_c" 1>&6 -echo "configure:1887: checking for sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_header_sys_procfs_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < -int main() { +int main() { return 0; } +int t() { prstatus_t t; ; return 0; } EOF -if { (eval echo configure:1899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_header_sys_procfs_h=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 rm -rf conftest* bfd_cv_header_sys_procfs_h=no fi rm -f conftest* + fi echo "$ac_t""$bfd_cv_header_sys_procfs_h" 1>&6 @@ -2098,6 +2015,7 @@ bfd_powerpc_pei_vec) tb="$tb pei-ppc.o cofflink.o" ;; bfd_powerpcle_pei_vec) tb="$tb pei-ppc.o cofflink.o" ;; ppcboot_vec) tb="$tb ppcboot.o" ;; + prc_vec) tb="$tb prc.o" ;; shcoff_vec) tb="$tb coff-sh.o cofflink.o" ;; shlcoff_vec) tb="$tb coff-sh.o cofflink.o" ;; som_vec) tb="$tb som.o" ;; @@ -2192,65 +2110,49 @@ test -n "${havevecs}" && tdefaults="${tdefaults} ${havevecs}" -for ac_hdr in unistd.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2200: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then +# If we cannot run a trivial program, we must be cross compiling. +echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext < conftest.$ac_ext < +main(){return(0);} EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" +{ (eval echo configure:2127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } +if test -s conftest && (./conftest; exit) 2>/dev/null; then + ac_cv_c_cross=no else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + ac_cv_c_cross=yes fi -rm -f conftest* fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 +rm -fr conftest* fi -done -for ac_func in getpagesize +echo "$ac_t""$ac_cv_c_cross" 1>&6 +cross_compiling=$ac_cv_c_cross + +for ac_func in valloc getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2239: 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 < /* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func(); -int main() { +int main() { return 0; } +int t() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named @@ -2263,18 +2165,16 @@ ; return 0; } EOF -if { (eval echo configure:2267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* -fi +fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` @@ -2288,170 +2188,94 @@ done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:2292: checking for working mmap" >&5 -if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then +if eval "test \"`echo '$''{'ac_cv_func_mmap'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then - ac_cv_func_mmap_fixed_mapped=no + ac_cv_func_mmap=no else - cat > conftest.$ac_ext < conftest.$ac_ext < #include #include -/* This mess was copied from the GNU getpagesize.h. */ #ifndef HAVE_GETPAGESIZE -# ifdef HAVE_UNISTD_H -# include -# endif - -/* Assume that all systems that can run configure have sys/param.h. */ -# ifndef HAVE_SYS_PARAM_H -# define HAVE_SYS_PARAM_H 1 +# include +# ifdef EXEC_PAGESIZE +# define getpagesize() EXEC_PAGESIZE +# else +# ifdef NBPG +# define getpagesize() NBPG * CLSIZE +# ifndef CLSIZE +# define CLSIZE 1 +# endif +# else +# ifdef NBPC +# define getpagesize() NBPC +# else +# define getpagesize() PAGESIZE /* SVR4 */ +# endif +# endif # endif +#endif -# ifdef _SC_PAGESIZE -# define getpagesize() sysconf(_SC_PAGESIZE) -# else /* no _SC_PAGESIZE */ -# ifdef HAVE_SYS_PARAM_H -# include -# ifdef EXEC_PAGESIZE -# define getpagesize() EXEC_PAGESIZE -# else /* no EXEC_PAGESIZE */ -# ifdef NBPG -# define getpagesize() NBPG * CLSIZE -# ifndef CLSIZE -# define CLSIZE 1 -# endif /* no CLSIZE */ -# else /* no NBPG */ -# ifdef NBPC -# define getpagesize() NBPC -# else /* no NBPC */ -# ifdef PAGESIZE -# define getpagesize() PAGESIZE -# endif /* PAGESIZE */ -# endif /* no NBPC */ -# endif /* no NBPG */ -# endif /* no EXEC_PAGESIZE */ -# else /* no HAVE_SYS_PARAM_H */ -# define getpagesize() 8192 /* punt totally */ -# endif /* no HAVE_SYS_PARAM_H */ -# endif /* no _SC_PAGESIZE */ - -#endif /* no HAVE_GETPAGESIZE */ +#ifndef HAVE_VALLOC +# define valloc malloc +#endif #ifdef __cplusplus -extern "C" { void *malloc(unsigned); } +extern "C" { void *valloc(unsigned), *malloc(unsigned); } #else -char *malloc(); +char *valloc(), *malloc(); #endif int main() { - char *data, *data2, *data3; - int i, pagesize; - int fd; - - pagesize = getpagesize(); - - /* - * First, make a file with some known garbage in it. - */ - data = malloc(pagesize); - if (!data) - exit(1); - for (i = 0; i < pagesize; ++i) - *(data + i) = rand(); - umask(0); - fd = creat("conftestmmap", 0600); - if (fd < 0) - exit(1); - if (write(fd, data, pagesize) != pagesize) - exit(1); - close(fd); - - /* - * Next, try to mmap the file at a fixed address which - * already has something else allocated at it. If we can, - * also make sure that we see the same garbage. - */ - fd = open("conftestmmap", O_RDWR); - if (fd < 0) - exit(1); - data2 = malloc(2 * pagesize); - if (!data2) - exit(1); - data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); - if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_FIXED, fd, 0L)) - exit(1); - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data2 + i)) - exit(1); - - /* - * Finally, make sure that changes to the mapped area - * do not percolate back to the file as seen by read(). - * (This is a bug on some variants of i386 svr4.0.) - */ - for (i = 0; i < pagesize; ++i) - *(data2 + i) = *(data2 + i) + 1; - data3 = malloc(pagesize); - if (!data3) - exit(1); - if (read(fd, data3, pagesize) != pagesize) - exit(1); - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data3 + i)) - exit(1); - close(fd); - unlink("conftestmmap"); - exit(0); + char *buf1, *buf2, *buf3; + int i = getpagesize(), j; + int i2 = i * 2; + int fd; + + buf1 = (char *)valloc(i2); + buf2 = (char *)valloc(i); + buf3 = (char *)malloc(i2); + for (j = 0; j < i2; ++j) + *(buf1 + j) = rand(); + fd = open("conftestmmap", O_CREAT | O_RDWR, 0666); + write(fd, buf1, i2); + mmap(buf2, i, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE, fd, 0); + for (j = 0; j < i; ++j) + if (*(buf1 + j) != *(buf2 + j)) + exit(1); + lseek(fd, (long)i, 0); + read(fd, buf2, i); /* read into mapped memory -- file should not change */ + /* (it does in i386 SVR4.0 - Jim Avera, jima@netcom.com) */ + lseek(fd, (long)0, 0); + read(fd, buf3, i2); + for (j = 0; j < i2; ++j) + if (*(buf1 + j) != *(buf3 + j)) + exit(1); + exit(0); } EOF -if { (eval echo configure:2440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null -then - ac_cv_func_mmap_fixed_mapped=yes +{ (eval echo configure:2268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } +if test -s conftest && (./conftest; exit) 2>/dev/null; then + ac_cv_func_mmap=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_mmap_fixed_mapped=no + ac_cv_func_mmap=no fi -rm -fr conftest* fi - +rm -fr conftest* fi -echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 -if test $ac_cv_func_mmap_fixed_mapped = yes; then +echo "$ac_t""$ac_cv_func_mmap" 1>&6 +if test $ac_cv_func_mmap = yes; then cat >> confdefs.h <<\EOF #define HAVE_MMAP 1 EOF @@ -2461,22 +2285,20 @@ for ac_func in madvise mprotect do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2465: 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 < /* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func(); -int main() { +int main() { return 0; } +int t() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named @@ -2489,18 +2311,16 @@ ; return 0; } EOF -if { (eval echo configure:2493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* -fi +fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` @@ -2538,25 +2358,11 @@ # --recheck option to rerun configure. # EOF -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | - case `(ac_space=' '; set) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache + sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \ + >> confcache if cmp -s $cache_file confcache; then : else @@ -2611,7 +2417,7 @@ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.12" + echo "$CONFIG_STATUS generated by autoconf version 2.9" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -2701,56 +2507,20 @@ CEOF EOF - -cat >> $CONFIG_STATUS <<\EOF - -# Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. -ac_more_lines=: -ac_sed_cmds="" -while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file - else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file - fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file - else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" - else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" - fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` - fi -done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat -fi -EOF - cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + # Support "outfile[:infile]", defaulting infile="outfile.in". case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. + # Adjust relative srcdir, etc. for subdirectories. # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` @@ -2778,7 +2548,6 @@ [/$]*) INSTALL="$ac_given_INSTALL" ;; *) INSTALL="$ac_dots$ac_given_INSTALL" ;; esac - echo creating "$ac_file" rm -f "$ac_file" configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." @@ -2787,16 +2556,14 @@ # $configure_input" ;; *) ac_comsub= ;; esac - - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` sed -e "$ac_comsub s%@configure_input@%$configure_input%g s%@srcdir@%$srcdir%g s%@top_srcdir@%$top_srcdir%g s%@INSTALL@%$INSTALL%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file +" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file fi; done -rm -f conftest.s* +rm -f conftest.subs # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. @@ -2817,17 +2584,11 @@ ac_eC=' ' ac_eD='%g' -if test "${CONFIG_HEADERS+set}" != set; then -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -fi +CONFIG_HEADERS=${CONFIG_HEADERS-"config.h:config.in"} for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + # Support "outfile[:infile]", defaulting infile="outfile.in". case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac @@ -2835,8 +2596,7 @@ echo creating $ac_file rm -f conftest.frag conftest.in conftest.out - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - cat $ac_file_inputs > conftest.in + cp $ac_given_srcdir/$ac_file_in conftest.in EOF @@ -2864,6 +2624,8 @@ # Break up conftest.vals because some shells have a limit on # the size of here documents, and old seds have small limits too. +# Maximum number of lines to put in a single here document. +ac_max_here_lines=12 rm -f conftest.tail while : @@ -2894,22 +2656,12 @@ echo "$ac_file is unchanged" rm -f conftest.h else - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - fi rm -f $ac_file mv conftest.h $ac_file fi fi; done -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac exit 0 EOF diff --recursive --new-file -u ../dist-src/bfd/configure.in ./bfd/configure.in --- ../dist-src/bfd/configure.in Wed Apr 30 09:55:56 1997 +++ ./bfd/configure.in Sun May 11 14:05:40 1997 @@ -525,6 +525,7 @@ bfd_powerpc_pei_vec) tb="$tb pei-ppc.o cofflink.o" ;; bfd_powerpcle_pei_vec) tb="$tb pei-ppc.o cofflink.o" ;; ppcboot_vec) tb="$tb ppcboot.o" ;; + prc_vec) tb="$tb prc.o" ;; shcoff_vec) tb="$tb coff-sh.o cofflink.o" ;; shlcoff_vec) tb="$tb coff-sh.o cofflink.o" ;; som_vec) tb="$tb som.o" ;; diff --recursive --new-file -u ../dist-src/bfd/prc.c ./bfd/prc.c --- ../dist-src/bfd/prc.c Wed Dec 31 16:00:00 1969 +++ ./bfd/prc.c Sun May 11 14:05:40 1997 @@ -0,0 +1,360 @@ +/* + * prc.c --- pilot resource BFD backend + * + * by Theodore Ts'o + */ + +#include + +#include "bfd.h" +#include "sysdep.h" +#include "libbfd.h" + +/* PRC File header */ + +typedef struct prc_header { + bfd_byte prc_name[32]; + bfd_byte prc_flags[2]; + bfd_byte prc_version[2]; + bfd_byte prc_create_time[4]; + bfd_byte prc_mod_time[4]; + bfd_byte prc_backup_time[4]; + bfd_byte prc_mod_num[4]; + bfd_byte prc_app_info[4]; + bfd_byte prc_sort_info[4]; + bfd_byte prc_type[4]; /* type */ + bfd_byte prc_id[4]; /* creator */ + bfd_byte prc_unique_id_seed[4]; + bfd_byte prc_next_record_list[4]; + bfd_byte prc_num_records[2]; +} prc_header_t; + +/* Section header */ + +typedef struct prc_sect { + bfd_byte sect_name[4]; + bfd_byte sect_id[2]; + bfd_byte sect_offset[4]; +} prc_sect_t; + +struct section_attribute { + const char *name; + flagword flags; + unsigned int alignment_power; +}; + +/* + * The PRC tdata structure definition + */ +typedef struct prc_tdata { + bfd_byte pt_name[32]; + bfd_byte pt_flags[2]; + bfd_byte pt_version[2]; + bfd_vma pt_create_time; + bfd_vma pt_mod_time; + bfd_vma pt_backup_time; + bfd_vma pt_mod_num; + bfd_vma pt_app_info; + bfd_vma pt_sort_info; + bfd_byte pt_type[4]; /* type */ + bfd_byte pt_id[4]; /* creator */ + bfd_vma pt_unique_id_seed; + bfd_vma pt_next_record_list; + bfd_vma pt_num_sections; +} prc_tdata_t; + +/* + * This defines the attributes for the various PRC sections + */ +static struct section_attribute prc_sects[] = { + "code", SEC_CODE | SEC_HAS_CONTENTS | SEC_LOAD | SEC_ALLOC, 2, + 0, SEC_HAS_CONTENTS | SEC_LOAD | SEC_ALLOC, 1 +}; + +static char prc_std_flags[2] = { 0, 1 }; +static char prc_std_version[2] = { 0, 1 }; +static char prc_std_type[4] = { 'a', 'p', 'p', 'l' }; + +/* Create a binary object. Invoked via bfd_set_format. */ + +static boolean +prc_mkobject (abfd) + bfd *abfd; +{ + prc_tdata_t *tdata; + + if (abfd->tdata.any == NULL) { + tdata = bfd_alloc (abfd, sizeof (prc_tdata_t)); + if (!tdata) + return false; + abfd->tdata.any = tdata; + memset(tdata, 0, sizeof(prc_tdata_t)); + memcpy(tdata->pt_type, prc_std_type, 4); + memcpy(tdata->pt_flags, prc_std_flags, 2); + memcpy(tdata->pt_version, prc_std_version, 2); + tdata->pt_create_time = 2942715600; + tdata->pt_mod_time = 2942715600; + } + return true; +} + +/* Check whether an existing file is PRC file. */ + +static const bfd_target * +prc_object_p (abfd) + bfd *abfd; +{ + prc_header_t prc_header; + prc_sect_t prc_section; + char *cp; + int i; + bfd_vma flags, nsect, id, offset; + asection *sec = NULL, *osec = NULL; + char *secname; + file_ptr pos; + struct stat statbuf; + struct section_attribute *sec_attr; + prc_tdata_t *tdata = NULL; + + if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0 + || (bfd_read (&prc_header, 1, sizeof(prc_header), abfd) != + sizeof(prc_header))) + return NULL; + + /* + * Check to see if we have a PRC file + */ + i = strlen(prc_header.prc_name); + flags = bfd_get_16(abfd, prc_header.prc_flags); + if ((i > 31) || + ((flags & 1) == 0) || + memcmp(prc_header.prc_version, prc_std_version, 2) || + memcmp(prc_header.prc_type, prc_std_type, 4)) { + bfd_set_error (bfd_error_wrong_format); + return NULL; + } +#if 0 + /* Pila stuffs its name in the last 4 bytes of the 32 byte field */ + /* Not all PRC's have this field zero padded! */ + for (; i < 28; i++) { + if (prc_header.prc_name[i]) { + bfd_set_error (bfd_error_wrong_format); + return NULL; + } + } +#endif + + if (!prc_mkobject(abfd)) + return NULL; + + /* + * Read in the section information + */ + nsect = bfd_get_16(abfd, prc_header.prc_num_records); + for (i=0; i < nsect; i++) { + if (bfd_read(&prc_section, 1, sizeof(prc_section), abfd) != + sizeof(prc_section)) + return NULL; + + id = bfd_get_16(abfd, prc_section.sect_id); + offset = bfd_get_32(abfd, prc_section.sect_offset); + + secname = malloc(10); + if (!secname) + return NULL; + memset(secname, 0, 10); + strncpy(secname, prc_section.sect_name, 4); + cp = secname + strlen(secname); + sprintf(cp, "%04x", id); + + for (sec_attr = prc_sects; sec_attr->name; sec_attr++) { + if (!strncmp(sec_attr->name, prc_section.sect_name, 4)) + break; + } + + sec = bfd_make_section (abfd, secname); + if (sec == NULL) + return NULL; + sec->vma = 0; + sec->lma = 0; + sec->filepos = offset; + sec->flags = sec_attr->flags; + sec->alignment_power = sec_attr->alignment_power; + if (osec) + osec->_raw_size = offset - osec->filepos; + osec = sec; + } + if (osec) { + if (bfd_stat (abfd, &statbuf) < 0) { + bfd_set_error (bfd_error_system_call); + return NULL; + } + osec->_raw_size = statbuf.st_size - osec->filepos; + } + bfd_default_set_arch_mach(abfd, bfd_arch_m68k, 0); + return abfd->xvec; +} + +/* + * Here's the symbol table support + * + * PRC's don't have symbol tables, but bfd_make_section requires that + * you need symbol table support + */ + +static asymbol * +prc_make_empty_symbol (abfd) + bfd *abfd; +{ + asymbol *new = (asymbol *) bfd_zalloc (abfd, sizeof (asymbol)); + if (new) + new->the_bfd = abfd; + return new; +} + +/* Return the amount of memory needed to read the symbol table. */ + +static long +prc_get_symtab_upper_bound (abfd) + bfd *abfd; +{ + return (bfd_get_symcount (abfd) + 1) * sizeof (asymbol *); +} + +/* Return the symbol table. */ + +static long +prc_get_symtab (abfd, alocation) + bfd *abfd; + asymbol **alocation; +{ + return 0; +} + +/*ARGSUSED*/ +static void +prc_get_symbol_info (ignore_abfd, symbol, ret) + bfd *ignore_abfd; + asymbol *symbol; + symbol_info *ret; +{ + bfd_symbol_info (symbol, ret); +} + +/*ARGSUSED*/ +static void +prc_print_symbol (ignore_abfd, afile, symbol, how) + bfd *ignore_abfd; + PTR afile; + asymbol *symbol; + bfd_print_symbol_type how; +{ + FILE *file = (FILE *) afile; + switch (how) + { + case bfd_print_symbol_name: + fprintf (file, "%s", symbol->name); + break; + default: + bfd_print_symbol_vandf ((PTR) file, symbol); + fprintf (file, " %-5s %s", + symbol->section->name, + symbol->name); + + } +} + +/* + * Write section support + */ + +static boolean +prc_emit_header(abfd) + bfd *abfd; +{ + /* + * XXX Still need to do! + */ + return true; +} + + +static boolean +prc_set_section_contents (abfd, section, location, offset, count) + bfd *abfd; + sec_ptr section; + PTR location; + file_ptr offset; + bfd_size_type count; +{ + if (abfd->output_has_begun == false) { + if (!prc_emit_header(abfd)) + return false; + } + + return _bfd_generic_set_section_contents(abfd, section, + location, + offset, count); +} + +#define prc_set_arch_mach bfd_generic_set_arch_mach +#define prc_bfd_is_local_label_name bfd_generic_is_local_label_name +#define prc_get_lineno _bfd_nosymbols_get_lineno +#define prc_find_nearest_line _bfd_nosymbols_find_nearest_line +#define prc_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol +#define prc_read_minisymbols _bfd_generic_read_minisymbols +#define prc_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol + + +/* + * + */ +const bfd_target prc_vec = +{ + "prc", /* name */ + bfd_target_unknown_flavour, /* flavour */ + BFD_ENDIAN_BIG, /* byteorder */ + BFD_ENDIAN_BIG, /* header_byteorder */ + (EXEC_P | HAS_RELOC), /* object_flags */ + (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_READONLY | SEC_CODE | SEC_DATA + | SEC_ROM | SEC_HAS_CONTENTS), /* section_flags */ + 0, /* symbol_leading_char */ + ' ', /* ar_pad_char */ + 16, /* ar_max_namelen */ + bfd_getb64, bfd_getb_signed_64, bfd_putb64, + bfd_getb32, bfd_getb_signed_32, bfd_putb32, + bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* data */ + bfd_getb64, bfd_getb_signed_64, bfd_putb64, + bfd_getb32, bfd_getb_signed_32, bfd_putb32, + bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */ + { /* bfd_check_format */ + _bfd_dummy_target, + prc_object_p, /* object format */ + _bfd_dummy_target, /* archive format */ + _bfd_dummy_target, /* core format */ + }, + { /* bfd_set_format */ + bfd_false, + prc_mkobject, /* object format */ + bfd_false, /* archive format */ + bfd_false, /* core format */ + }, + { /* bfd_write_contents */ + bfd_false, + bfd_true, + bfd_false, + bfd_false, + }, + + BFD_JUMP_TABLE_GENERIC (_bfd_generic), + BFD_JUMP_TABLE_COPY (_bfd_generic), + BFD_JUMP_TABLE_CORE (_bfd_nocore), + BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive), + BFD_JUMP_TABLE_SYMBOLS (prc), + BFD_JUMP_TABLE_RELOCS (_bfd_norelocs), + BFD_JUMP_TABLE_WRITE (_bfd_generic), + BFD_JUMP_TABLE_LINK (_bfd_nolink), + BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), + + NULL +}; diff --recursive --new-file -u ../dist-src/bfd/targets.c ./bfd/targets.c --- ../dist-src/bfd/targets.c Wed Apr 30 09:56:28 1997 +++ ./bfd/targets.c Sun May 11 14:05:40 1997 @@ -562,6 +562,7 @@ extern const bfd_target oasys_vec; extern const bfd_target pc532machaout_vec; extern const bfd_target ppcboot_vec; +extern const bfd_target prc_vec; extern const bfd_target riscix_vec; extern const bfd_target pmac_xcoff_vec; extern const bfd_target rs6000coff_vec;