  #define ELF_ARCH			    bfd_arch_i386
  #define ELF_MACHINE_CODE		    EM_X86_64
  #define ELF_MAXPAGESIZE			    0x200000
-@@ -4470,6 +4565,63 @@
+@@ -4470,6 +4565,66 @@
  #undef  elf_backend_post_process_headers
  #define elf_backend_post_process_headers  _bfd_elf_set_osabi
  

+}
+#endif
 #endif /* OBJ_ELF || OBJ_MAYBE_ELF */
diff -uNr binutils-2.20.orig/gas/config/tc-i386.h binutils-2.20/gas/config/tc-i386.h
--- binutils-2.20.orig/gas/config/tc-i386.h	2009-09-02 09:24:20.000000000 +0200
+++ binutils-2.20/gas/config/tc-i386.h	2009-11-23 13:58:30.000000000 +0100
@@ -297,4 +297,12 @@
 /* X_add_symbol:X_op_symbol (Intel mode only) */
 #define O_full_ptr O_md2

 x86_64-*-netbsd*)	targ_emul=elf_x86_64
 			targ_extra_emuls="elf_i386 i386nbsd elf_l1om"
 			tdir_elf_i386=`echo ${targ_alias} | \
diff -Naur ../PRISTINE/binutils-2.20/ld/emulparams/elf64_nacl.sh binutils-2.20/ld/emulparams/elf64_nacl.sh
--- ../PRISTINE/binutils-2.20/ld/emulparams/elf64_nacl.sh	1969-12-31 16:00:00.000000000 -0800
+++ binutils-2.20/ld/emulparams/elf64_nacl.sh	2010-01-05 13:21:03.785168000 -0800
@@ -0,0 +1,4 @@
+. ${srcdir}/emulparams/elf_x86_64.sh
+SCRIPT_NAME=naclelf
+OUTPUT_FORMAT="elf64-nacl"
+TEXT_START_ADDR=0x00020000
diff -Naur ../PRISTINE/binutils-2.20/ld/emulparams/elf_nacl.sh binutils-2.20/ld/emulparams/elf_nacl.sh
--- ../PRISTINE/binutils-2.20/ld/emulparams/elf_nacl.sh	1969-12-31 16:00:00.000000000 -0800
+++ binutils-2.20/ld/emulparams/elf_nacl.sh	2010-01-05 13:21:03.798157000 -0800
@@ -0,0 +1,4 @@
+. ${srcdir}/emulparams/elf_i386.sh
+SCRIPT_NAME=naclelf
