$OpenBSD: patch-gas_config_tc-i386_h,v 1.5 2003/06/13 04:17:12 brad Exp $
--- gas/config/tc-i386.h.orig	Mon Sep 23 15:11:17 2002
+++ gas/config/tc-i386.h	Thu Jun 12 21:56:14 2003
@@ -79,7 +79,7 @@ extern unsigned long i386_mach PARAMS ((
 #ifdef TE_FreeBSD
 #define AOUT_TARGET_FORMAT	"a.out-i386-freebsd"
 #endif
-#ifdef TE_NetBSD
+#if defined(TE_NetBSD) || defined(TE_OpenBSD)
 #define AOUT_TARGET_FORMAT	"a.out-i386-netbsd"
 #endif
 #ifdef TE_386BSD
@@ -515,7 +515,11 @@ arch_entry;
 /* The name of the global offset table generated by the compiler. Allow
    this to be overridden if need be.  */
 #ifndef GLOBAL_OFFSET_TABLE_NAME
+#ifdef OBJ_ELF
 #define GLOBAL_OFFSET_TABLE_NAME "_GLOBAL_OFFSET_TABLE_"
+#else
+#define GLOBAL_OFFSET_TABLE_NAME "__GLOBAL_OFFSET_TABLE_"
+#endif
 #endif
 
 #ifdef BFD_ASSEMBLER
