$OpenBSD: patch-gas_config_tc-i386_h,v 1.6 2003/10/11 00:52:22 brad Exp $
--- gas/config/tc-i386.h.orig	2003-01-23 07:51:05.000000000 -0500
+++ gas/config/tc-i386.h	2003-09-04 02:03:36.000000000 -0400
@@ -41,7 +41,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
@@ -444,7 +444,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
 
 #ifndef LEX_AT
