Index: trunk/src/binutils/bfd/config.bfd
===================================================================
--- trunk/src/binutils/bfd/config.bfd	(revision 903)
+++ trunk/src/binutils/bfd/config.bfd	(revision 907)
@@ -75,10 +75,10 @@
 case "${targ}" in
   mips*-dec-bsd*)
-    echo "This target is obsolete and has been removed." 
+    echo "This target is obsolete and has been removed."
     exit 1
     ;;
 
   mips*-*-pe*)
-    echo "This target is obsolete and has been removed." 
+    echo "This target is obsolete and has been removed."
     exit 1
     ;;
@@ -375,5 +375,5 @@
 #endif /* defined (HOST_HPPAHPUX) || defined (HOST_HPPABSD) || defined (HOST_HPPAOSF) */
 
-  i370-*-*) 
+  i370-*-*)
     targ_defvec=bfd_elf32_i370_vec
     targ_selvecs="bfd_elf32_i370_vec"
@@ -447,5 +447,5 @@
     esac
     ;;
-  i[3456]86-*-netbsdelf*) 
+  i[3456]86-*-netbsdelf*)
     targ_defvec=bfd_elf32_i386_vec
     targ_selvecs=i386netbsd_vec
@@ -543,7 +543,12 @@
     targ_selfvecs=i386chaos_vec
     ;;
+  i[3456]86-*-os2-elf)
+    targ_defvec=bfd_elf32_i386_vec
+    targ_selvecs="bfd_elf32_i386_vec i386aout_emx_vec"
+    targ_underscore=yes
+    ;;
   i[3456]86-*-os2*)
-    targ_defvec=bfd_elf32_i386_vec
-    targ_selvecs="bfd_elf32_i386_vec i386aout_emx_vec"
+    targ_defvec=i386aout_emx_vec
+    targ_selvecs="i386aout_emx_vec bfd_elf32_i386_vec"
     targ_underscore=yes
     ;;
@@ -666,5 +671,5 @@
     targ_underscore=yes
     ;;
-  m68*-*-netbsdelf*) 
+  m68*-*-netbsdelf*)
     targ_defvec=bfd_elf32_m68k_vec
     targ_selvecs="m68knetbsd_vec m68k4knetbsd_vec hp300bsd_vec sunos_big_vec"
Index: trunk/src/binutils/bfd/configure
===================================================================
--- trunk/src/binutils/bfd/configure	(revision 903)
+++ trunk/src/binutils/bfd/configure	(revision 907)
@@ -2,5 +2,5 @@
 
 # Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
+# Generated automatically using autoconf version 2.13 
 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
 #
@@ -854,5 +854,5 @@
 fi
 
-
+  
 
 
@@ -2250,5 +2250,5 @@
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-
+  
      ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -2376,9 +2376,9 @@
 exec 5>>./config.log
 
-
-
-
-	
-	
+  
+
+  
+	 
+	 
 
 # Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given.
@@ -2466,5 +2466,5 @@
 
   echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
-
+  
 
 if test $USE_MAINTAINER_MODE = yes; then
@@ -2476,5 +2476,5 @@
 fi
   MAINT=$MAINTAINER_MODE_TRUE
-
+  
 
 echo $ac_n "checking whether to install libbfd""... $ac_c" 1>&6
@@ -2493,5 +2493,5 @@
 
   echo "$ac_t""$install_libbfd_p" 1>&6
-
+  
 
 if test $install_libbfd_p = yes; then
@@ -2509,6 +2509,6 @@
     bfdincludedir='$(exec_prefix)/$(host_alias)/$(target_alias)/include'
   fi
-
-
+  
+  
 
 
@@ -3071,5 +3071,5 @@
 if test $ac_cv_c_const = no; then
   cat >> confdefs.h <<\EOF
-#define const
+#define const 
 EOF
 
@@ -3107,5 +3107,5 @@
   inline | yes) ;;
   no) cat >> confdefs.h <<\EOF
-#define inline
+#define inline 
 EOF
  ;;
@@ -3451,5 +3451,5 @@
 #define $ac_tr_hdr 1
 EOF
-
+ 
 else
   echo "$ac_t""no" 1>&6
@@ -3506,5 +3506,5 @@
 #define $ac_tr_func 1
 EOF
-
+ 
 else
   echo "$ac_t""no" 1>&6
@@ -3683,5 +3683,5 @@
 fi
 
-
+                              
    for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
 unistd.h values.h sys/param.h
@@ -3720,5 +3720,5 @@
 #define $ac_tr_hdr 1
 EOF
-
+ 
 else
   echo "$ac_t""no" 1>&6
@@ -3776,5 +3776,5 @@
 #define $ac_tr_func 1
 EOF
-
+ 
 else
   echo "$ac_t""no" 1>&6
@@ -3833,5 +3833,5 @@
 #define $ac_tr_func 1
 EOF
-
+ 
 else
   echo "$ac_t""no" 1>&6
@@ -3892,5 +3892,5 @@
 
     echo "$ac_t""$USE_NLS" 1>&6
-
+    
 
     USE_INCLUDED_LIBINTL=no
@@ -4132,5 +4132,5 @@
 #define $ac_tr_func 1
 EOF
-
+ 
 else
   echo "$ac_t""no" 1>&6
@@ -4242,5 +4242,5 @@
 
 
-	
+	        
         if test "$CATOBJEXT" = "NONE"; then
 	  	  	  nls_cv_use_gnu_gettext=yes
@@ -4358,5 +4358,5 @@
 fi
 
-
+        
 	USE_INCLUDED_LIBINTL=yes
         CATOBJEXT=.gmo
@@ -4399,16 +4399,16 @@
     done
 
-
-
-
-
-
-
-
-
-
-
-
-
+        
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+  
 
    if test "x$CATOBJEXT" != "x"; then
@@ -4439,5 +4439,5 @@
 /* The system does not provide the header <locale.h>.  Take care yourself.  */"
    fi
-
+   
 
             if test -f $srcdir/po2tbl.sed.in; then
@@ -4492,12 +4492,12 @@
      GT_YES="#YES#"
    fi
-
-
+   
+   
 
    MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
-
+   
 
       l=
-
+   
 
             if test -f $srcdir/po/POTFILES.in; then
@@ -4516,5 +4516,5 @@
 	 < $srcdir/po/POTFILES.in > po/POTFILES
    fi
-
+  
 
 # Permit host specific settings.
@@ -4678,5 +4678,5 @@
 #define $ac_tr_hdr 1
 EOF
-
+ 
 else
   echo "$ac_t""no" 1>&6
@@ -4719,5 +4719,5 @@
 #define $ac_tr_hdr 1
 EOF
-
+ 
 else
   echo "$ac_t""no" 1>&6
@@ -4934,5 +4934,5 @@
 #define $ac_tr_func 1
 EOF
-
+ 
 else
   echo "$ac_t""no" 1>&6
@@ -5262,8 +5262,5 @@
   i[3456]86-*-os2*)
 	COREFILE=trad-core.lo
-	cat >> confdefs.h <<\EOF
-#define TRAD_HEADER "hosts/i386emx.h"
-EOF
-
+	TRAD_HEADER='"hosts/i386emx.h"'
 	;;
   i860-*-mach3* | i860-*-osf1*)
@@ -5359,7 +5356,7 @@
 	# have c_impl as a member of struct core_dumpx
 	echo $ac_n "checking for c_impl in struct core_dumpx""... $ac_c" 1>&6
-echo "configure:5362: checking for c_impl in struct core_dumpx" >&5
+echo "configure:5359: checking for c_impl in struct core_dumpx" >&5
 	cat > conftest.$ac_ext <<EOF
-#line 5364 "configure"
+#line 5361 "configure"
 #include "confdefs.h"
 #include <core.h>
@@ -5368,5 +5365,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:5371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5368: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cat >> confdefs.h <<\EOF
@@ -5436,5 +5433,5 @@
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5439: checking for $ac_hdr" >&5
+echo "configure:5436: 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
@@ -5442,10 +5439,10 @@
   cat > conftest.$ac_ext <<EOF
 #include <sys/types.h>
-#line 5445 "configure"
+#line 5442 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5450: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5447: \"$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
@@ -5467,5 +5464,5 @@
 #define $ac_tr_hdr 1
 EOF
-
+ 
 else
   echo "$ac_t""no" 1>&6
@@ -5475,10 +5472,10 @@
   if test "$ac_cv_header_sys_procfs_h" = yes; then
     echo $ac_n "checking for prstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5478: checking for prstatus_t in sys/procfs.h" >&5
+echo "configure:5475: checking for prstatus_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5483 "configure"
+#line 5480 "configure"
 #include "confdefs.h"
 
@@ -5489,5 +5486,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:5492: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_prstatus_t=yes
@@ -5497,5 +5494,5 @@
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_prstatus_t=no
-
+   
 fi
 rm -f conftest*
@@ -5511,10 +5508,10 @@
 
     echo $ac_n "checking for prstatus32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5514: checking for prstatus32_t in sys/procfs.h" >&5
+echo "configure:5511: checking for prstatus32_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus32_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5519 "configure"
+#line 5516 "configure"
 #include "confdefs.h"
 
@@ -5525,5 +5522,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:5528: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_prstatus32_t=yes
@@ -5533,5 +5530,5 @@
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_prstatus32_t=no
-
+   
 fi
 rm -f conftest*
@@ -5547,10 +5544,10 @@
 
     echo $ac_n "checking for prstatus_t.pr_who in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5550: checking for prstatus_t.pr_who in sys/procfs.h" >&5
+echo "configure:5547: checking for prstatus_t.pr_who in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5555 "configure"
+#line 5552 "configure"
 #include "confdefs.h"
 
@@ -5561,5 +5558,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:5564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=yes
@@ -5569,5 +5566,5 @@
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=no
-
+   
 fi
 rm -f conftest*
@@ -5583,10 +5580,10 @@
 
     echo $ac_n "checking for prstatus32_t.pr_who in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5586: checking for prstatus32_t.pr_who in sys/procfs.h" >&5
+echo "configure:5583: checking for prstatus32_t.pr_who in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5591 "configure"
+#line 5588 "configure"
 #include "confdefs.h"
 
@@ -5597,5 +5594,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:5600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=yes
@@ -5605,5 +5602,5 @@
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=no
-
+   
 fi
 rm -f conftest*
@@ -5619,10 +5616,10 @@
 
     echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5622: checking for pstatus_t in sys/procfs.h" >&5
+echo "configure:5619: checking for pstatus_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5627 "configure"
+#line 5624 "configure"
 #include "confdefs.h"
 
@@ -5633,5 +5630,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:5636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5633: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_pstatus_t=yes
@@ -5641,5 +5638,5 @@
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_pstatus_t=no
-
+   
 fi
 rm -f conftest*
@@ -5655,10 +5652,10 @@
 
     echo $ac_n "checking for pxstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5658: checking for pxstatus_t in sys/procfs.h" >&5
+echo "configure:5655: checking for pxstatus_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pxstatus_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5663 "configure"
+#line 5660 "configure"
 #include "confdefs.h"
 
@@ -5669,5 +5666,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:5672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5669: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_pxstatus_t=yes
@@ -5677,5 +5674,5 @@
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_pxstatus_t=no
-
+   
 fi
 rm -f conftest*
@@ -5691,10 +5688,10 @@
 
     echo $ac_n "checking for pstatus32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5694: checking for pstatus32_t in sys/procfs.h" >&5
+echo "configure:5691: checking for pstatus32_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus32_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5699 "configure"
+#line 5696 "configure"
 #include "confdefs.h"
 
@@ -5705,5 +5702,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:5708: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_pstatus32_t=yes
@@ -5713,5 +5710,5 @@
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_pstatus32_t=no
-
+   
 fi
 rm -f conftest*
@@ -5727,10 +5724,10 @@
 
     echo $ac_n "checking for prpsinfo_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5730: checking for prpsinfo_t in sys/procfs.h" >&5
+echo "configure:5727: checking for prpsinfo_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5735 "configure"
+#line 5732 "configure"
 #include "confdefs.h"
 
@@ -5741,5 +5738,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:5744: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_prpsinfo_t=yes
@@ -5749,5 +5746,5 @@
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_prpsinfo_t=no
-
+   
 fi
 rm -f conftest*
@@ -5763,10 +5760,10 @@
 
     echo $ac_n "checking for prpsinfo32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5766: checking for prpsinfo32_t in sys/procfs.h" >&5
+echo "configure:5763: checking for prpsinfo32_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo32_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5771 "configure"
+#line 5768 "configure"
 #include "confdefs.h"
 
@@ -5777,5 +5774,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:5780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_prpsinfo32_t=yes
@@ -5785,5 +5782,5 @@
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_prpsinfo32_t=no
-
+   
 fi
 rm -f conftest*
@@ -5799,10 +5796,10 @@
 
     echo $ac_n "checking for psinfo_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5802: checking for psinfo_t in sys/procfs.h" >&5
+echo "configure:5799: checking for psinfo_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5807 "configure"
+#line 5804 "configure"
 #include "confdefs.h"
 
@@ -5813,5 +5810,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:5816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_psinfo_t=yes
@@ -5821,5 +5818,5 @@
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_psinfo_t=no
-
+   
 fi
 rm -f conftest*
@@ -5835,10 +5832,10 @@
 
     echo $ac_n "checking for psinfo32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5838: checking for psinfo32_t in sys/procfs.h" >&5
+echo "configure:5835: checking for psinfo32_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo32_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5843 "configure"
+#line 5840 "configure"
 #include "confdefs.h"
 
@@ -5849,5 +5846,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:5852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_psinfo32_t=yes
@@ -5857,5 +5854,5 @@
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_psinfo32_t=no
-
+   
 fi
 rm -f conftest*
@@ -5871,10 +5868,10 @@
 
     echo $ac_n "checking for lwpstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5874: checking for lwpstatus_t in sys/procfs.h" >&5
+echo "configure:5871: checking for lwpstatus_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpstatus_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5879 "configure"
+#line 5876 "configure"
 #include "confdefs.h"
 
@@ -5885,5 +5882,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:5888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_lwpstatus_t=yes
@@ -5893,5 +5890,5 @@
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_lwpstatus_t=no
-
+   
 fi
 rm -f conftest*
@@ -5907,10 +5904,10 @@
 
     echo $ac_n "checking for lwpxstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5910: checking for lwpxstatus_t in sys/procfs.h" >&5
+echo "configure:5907: checking for lwpxstatus_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpxstatus_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5915 "configure"
+#line 5912 "configure"
 #include "confdefs.h"
 
@@ -5921,5 +5918,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:5924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_lwpxstatus_t=yes
@@ -5929,5 +5926,5 @@
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_lwpxstatus_t=no
-
+   
 fi
 rm -f conftest*
@@ -5943,10 +5940,10 @@
 
     echo $ac_n "checking for lwpstatus_t.pr_context in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5946: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5
+echo "configure:5943: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5951 "configure"
+#line 5948 "configure"
 #include "confdefs.h"
 
@@ -5957,5 +5954,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:5960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=yes
@@ -5965,5 +5962,5 @@
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=no
-
+   
 fi
 rm -f conftest*
@@ -5979,10 +5976,10 @@
 
     echo $ac_n "checking for lwpstatus_t.pr_reg in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5982: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5
+echo "configure:5979: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5987 "configure"
+#line 5984 "configure"
 #include "confdefs.h"
 
@@ -5993,5 +5990,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:5996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=yes
@@ -6001,5 +5998,5 @@
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=no
-
+   
 fi
 rm -f conftest*
@@ -6015,10 +6012,10 @@
 
     echo $ac_n "checking for win32_pstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:6018: checking for win32_pstatus_t in sys/procfs.h" >&5
+echo "configure:6015: checking for win32_pstatus_t in sys/procfs.h" >&5
  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_win32_pstatus_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6023 "configure"
+#line 6020 "configure"
 #include "confdefs.h"
 
@@ -6029,5 +6026,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:6032: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6029: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_win32_pstatus_t=yes
@@ -6037,5 +6034,5 @@
   rm -rf conftest*
   bfd_cv_have_sys_procfs_type_win32_pstatus_t=no
-
+   
 fi
 rm -f conftest*
@@ -6506,8 +6503,8 @@
        bad_64bit_gcc=no;
        echo $ac_n "checking for gcc version with buggy 64-bit support""... $ac_c" 1>&6
-echo "configure:6509: checking for gcc version with buggy 64-bit support" >&5
+echo "configure:6506: checking for gcc version with buggy 64-bit support" >&5
        # Add more tests for gcc versions with non-working 64-bit support here.
        cat > conftest.$ac_ext <<EOF
-#line 6512 "configure"
+#line 6509 "configure"
 #include "confdefs.h"
 :__GNUC__:__GNUC_MINOR__:__i386__:
@@ -6555,5 +6552,5 @@
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6558: checking for $ac_hdr" >&5
+echo "configure:6555: 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
@@ -6561,10 +6558,10 @@
   cat > conftest.$ac_ext <<EOF
 #include <sys/types.h>
-#line 6564 "configure"
+#line 6561 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6566: \"$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
@@ -6586,5 +6583,5 @@
 #define $ac_tr_hdr 1
 EOF
-
+ 
 else
   echo "$ac_t""no" 1>&6
@@ -6595,10 +6592,10 @@
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6598: checking for $ac_func" >&5
+echo "configure:6595: 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 6603 "configure"
+#line 6600 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
@@ -6623,5 +6620,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:6626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6623: \"$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"
@@ -6641,5 +6638,5 @@
 #define $ac_tr_func 1
 EOF
-
+ 
 else
   echo "$ac_t""no" 1>&6
@@ -6648,5 +6645,5 @@
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:6651: checking for working mmap" >&5
+echo "configure:6648: 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
@@ -6656,5 +6653,5 @@
 else
   cat > conftest.$ac_ext <<EOF
-#line 6659 "configure"
+#line 6656 "configure"
 #include "confdefs.h"
 
@@ -6796,5 +6793,5 @@
 
 EOF
-if { (eval echo configure:6799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6796: \"$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
@@ -6821,10 +6818,10 @@
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6824: checking for $ac_func" >&5
+echo "configure:6821: 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 6829 "configure"
+#line 6826 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
@@ -6849,5 +6846,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:6852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6849: \"$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"
@@ -6867,5 +6864,5 @@
 #define $ac_tr_func 1
 EOF
-
+ 
 else
   echo "$ac_t""no" 1>&6
Index: trunk/src/binutils/bfd/configure.in
===================================================================
--- trunk/src/binutils/bfd/configure.in	(revision 903)
+++ trunk/src/binutils/bfd/configure.in	(revision 907)
@@ -709,5 +709,5 @@
     i386netbsd_vec)		tb="$tb i386netbsd.lo aout32.lo" ;;
     i386os9k_vec)		tb="$tb i386os9k.lo aout32.lo" ;;
-    i386aout_emx_vec)		tb="$tb i386aoutemx.lo" ;;
+    i386aout_emx_vec)		tb="$tb i386aoutemx.lo aout32.lo" ;;
     i386pe_vec)			tb="$tb pe-i386.lo peigen.lo cofflink.lo" ;;
     i386pei_vec)		tb="$tb pei-i386.lo peigen.lo cofflink.lo" ;;
Index: trunk/src/binutils/bfd/hosts/i386emx.h
===================================================================
--- trunk/src/binutils/bfd/hosts/i386emx.h	(revision 903)
+++ trunk/src/binutils/bfd/hosts/i386emx.h	(revision 907)
@@ -1,6 +1,57 @@
 /* Intel ix86 running OS/2 or DOS */
 
-#define HOST_PAGE_SIZE		0x1000
-#define HOST_SEGMENT_SIZE	0x10000
-#define HOST_TEXT_START_ADDR	0x10000
-#define HOST_STACK_END_ADDR	0x80000000
+#ifndef __I386EMX__H__
+#define __I386EMX__H__
+
+#define EMX
+
+#define DEFAULT_ARCH		bfd_arch_i386
+
+#define TARGET_PAGE_SIZE	0x1000
+#define TARGET_SEGMENT_SIZE	0x10000
+#define TEXT_START_ADDR		0x10000
+#define TARGET_STACK_END_ADDR	0x80000000
+
+#define HOST_PAGE_SIZE          0x1000
+#define HOST_SEGMENT_SIZE       0x10000
+#define HOST_TEXT_START_ADDR    0x10000
+#define HOST_STACK_END_ADDR     0x80000000
+
+
+#define ZMAGIC_DISK_BLOCK_SIZE	1024
+#define BYTES_IN_WORD		4
+#define NO_CORE_COMMAND
+
+#define MY(OP)			CONCAT2(i386aout_emx_,OP)
+#define TARGETNAME		"a.out-emx"
+#define NO_WRITE_HEADER_KLUDGE	1
+
+/* a.out executables emx-specific header */
+struct exec
+{
+  unsigned long a_info;		/* Use macros N_MAGIC, etc for access */
+  unsigned a_text;		/* length of text, in bytes */
+  unsigned a_data;		/* length of data, in bytes */
+  unsigned a_bss;		/* length of uninitialized data area for file, in bytes */
+  unsigned a_syms;		/* length of symbol table data in file, in bytes */
+  unsigned a_entry;		/* start address */
+  unsigned a_trsize;		/* length of relocation info for text, in bytes */
+  unsigned a_drsize;		/* length of relocation info for data, in bytes */
+};
+
+#define N_HEADER_IN_TEXT(x) 0
+
+#define N_TXTOFF(x)	\
+    (N_MAGIC(x) != ZMAGIC ? EXEC_BYTES_SIZE : /* object file or NMAGIC */\
+     N_SHARED_LIB(x) ? 0 : \
+     N_HEADER_IN_TEXT(x) ?	\
+	    EXEC_BYTES_SIZE :			/* no padding */\
+            0x400 + (x).a_hdrofs \
+    )
+
+#define N_DATOFF(x) (N_TXTOFF(x) + N_TXTSIZE(x))
+
+#define IS_STAB(flags) (((flags) & N_STAB) \
+	&& (flags) != (N_IMP1|N_EXT) && (flags) != (N_IMP2|N_EXT))
+
+#endif /* __I386EMX__H__ */
Index: trunk/src/binutils/bfd/i386aoutemx.c
===================================================================
--- trunk/src/binutils/bfd/i386aoutemx.c	(revision 903)
+++ trunk/src/binutils/bfd/i386aoutemx.c	(revision 907)
@@ -18,28 +18,16 @@
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
-#define EMX
+#include "sysdep.h"
+#ifdef TRAD_HEADER
+#include TRAD_HEADER
+#endif
+#include "bfd.h"
+#include "libbfd.h"
+#include "libaout.h"
+#ifndef EMX
+#error "EMX TARGET! EMX isn't defined!!!"
+#endif
 
-#define ARCH_SIZE		32
-#define DEFAULT_ARCH		bfd_arch_i386
-
-#define TEXT_START_ADDR		0x10000
-#define TARGET_PAGE_SIZE	0x1000
-#define TARGET_SEGMENT_SIZE	0x10000
-#define TARGET_STACK_END_ADDR	0x80000000
-
-#define ZMAGIC_DISK_BLOCK_SIZE	1024
-#define BYTES_IN_WORD		4
-#define NO_CORE_COMMAND
-
-#define MY(OP)			CONCAT2(i386aout_emx_,OP)
-#define TARGETNAME		"a.out-emx"
-
-#define IS_STAB(flags) (((flags) & N_STAB) \
-	&& (flags) != (N_IMP1|N_EXT) && (flags) != (N_IMP2|N_EXT))
-
-#include "aout/aoutemx.h"
-#include "aoutx.h"
-
-#define MY_object_p		MY(object_p)
+#define MY_object_p MY(object_p)
 #define MY_backend_data &MY(backend_data)
 
Index: trunk/src/binutils/bfd/libaout.h
===================================================================
--- trunk/src/binutils/bfd/libaout.h	(revision 903)
+++ trunk/src/binutils/bfd/libaout.h	(revision 907)
@@ -23,4 +23,12 @@
 #ifndef LIBAOUT_H
 #define LIBAOUT_H
+
+/* !! NASTY HACK !! */
+#ifdef __EMX__
+#include "config.h"
+#ifdef TRAD_HEADER
+#include TRAD_HEADER
+#endif
+#endif
 
 /* We try to encapsulate the differences in the various a.out file
@@ -253,6 +261,12 @@
 {
     long a_info;		/* Magic number and flags, packed */
-#if defined (EMX)
+#ifdef EMX
     long a_hdrofs;		/* Offset from file start to a.out header */
+#else
+/** remove me **/
+#ifdef __EMX__
+#error "error EMX is not defined!!!"
+#endif
+/** remove me **/
 #endif
     bfd_vma a_text;		/* length of text, in bytes  */
Index: trunk/src/binutils/bfd/sysdep.h
===================================================================
--- trunk/src/binutils/bfd/sysdep.h	(revision 903)
+++ trunk/src/binutils/bfd/sysdep.h	(revision 907)
@@ -26,4 +26,10 @@
 
 #include "config.h"
+
+#ifdef __EMX__ /* r=bird: hmm seen this before. */
+#ifdef TRAD_HEADER
+#include TRAD_HEADER
+#endif
+#endif /* __EMX__ */
 
 #ifdef HAVE_STDDEF_H
Index: trunk/src/binutils/gas/as.c
===================================================================
--- trunk/src/binutils/gas/as.c	(revision 903)
+++ trunk/src/binutils/gas/as.c	(revision 907)
@@ -224,5 +224,5 @@
 
 #ifdef BFD_ASSEMBLER
-  fprintf (stderr, _("GNU assembler version %s (%s) using BFD version %s"),
+  fprintf (stderr, _("GNU assembler version %s (%s) using BFD version %s (Innotek Build 2003-12-15 21:40)"),
 	   VERSION, TARGET_ALIAS, BFD_VERSION_STRING);
 #else
@@ -546,7 +546,7 @@
 	  /* This output is intended to follow the GNU standards document.  */
 #ifdef BFD_ASSEMBLER
-	  printf (_("GNU assembler %s\n"), BFD_VERSION_STRING);
+	  printf (_("GNU assembler %s (Innotek Build 2003-12-15 21:40)\n"), BFD_VERSION_STRING);
 #else
-	  printf (_("GNU assembler %s\n"), VERSION);
+	  printf (_("GNU assembler %s (Innotek Build 2003-12-15 21:40)\n"), VERSION);
 #endif
 	  printf (_("Copyright 2002 Free Software Foundation, Inc.\n"));
Index: trunk/src/binutils/include/aout/aout64.h
===================================================================
--- trunk/src/binutils/include/aout/aout64.h	(revision 903)
+++ trunk/src/binutils/include/aout/aout64.h	(revision 907)
@@ -7,10 +7,10 @@
    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
@@ -27,5 +27,5 @@
 
 #ifndef external_exec
-struct external_exec 
+struct external_exec
 {
   bfd_byte e_info[4];		    /* Magic number and stuff.  */
@@ -334,5 +334,9 @@
 #define N_WEAKB 0x11		/* Weak bss symbol.  */
 
-/* Relocations 
+/* emx-specific symbols.  */
+#define N_IMP1 0x68		/* Import reference (emx specific) */
+#define N_IMP2 0x6a		/* Import definition (emx specific) */
+
+/* Relocations
 
   There	are two types of relocation flavours for a.out systems,
@@ -484,10 +488,10 @@
   RELOC_HHI22,			/* data[0:21] = (addend + sv) >> 42     */
   RELOC_HLO10,			/* data[0:9] = (addend + sv) >> 32      */
-  
+
   /* 29K relocation types.  */
   RELOC_JUMPTARG,
   RELOC_CONST,
   RELOC_CONSTH,
-  
+
   /* All the new ones I can think of, for sparc v9.  */
   RELOC_64,			/* data[0:63] = addend + sv 		*/
