This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PATCH: Define ELF_TARGET_FORMAT* for Solaris 2/x86
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: binutils at sourceware dot org
- Date: Mon, 08 Mar 2010 11:24:12 +0100
- Subject: PATCH: Define ELF_TARGET_FORMAT* for Solaris 2/x86
When I tried to use not only the gld with my Solaris 2 ABI patch, but
gas as well, I noticed that it doesn't work at all:
$ gas-2.20.51 -V
GNU assembler version 2.20.51 (i386-pc-solaris2.11) using BFD version (GNU Binutils) 2.20.51.20100305
Assembler messages:
Fatal error: selected target format 'elf32-i386' unknown
Fixed as follows.
Ok for mainline? This might count as obvious, though.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
2010-03-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* config/tc-i386.h [TE_SOLARIS] (ELF_TARGET_FORMAT): Define.
(ELF_TARGET_FORMAT64): Define.
Index: gas/config/tc-i386.h
===================================================================
RCS file: /vol/gnu/src/binutils/src-cvs/src/gas/config/tc-i386.h,v
retrieving revision 1.115
diff -u -p -u -p -r1.115 tc-i386.h
--- gas/config/tc-i386.h 3 Feb 2010 20:36:13 -0000 1.115
+++ gas/config/tc-i386.h 6 Mar 2010 08:46:17 -0000
@@ -1,6 +1,6 @@
/* tc-i386.h -- Header file for tc-i386.c
Copyright 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -61,6 +61,11 @@ extern unsigned long i386_mach (void);
#define ELF_TARGET_FORMAT64 "elf64-x86-64-freebsd"
#elif defined (TE_VXWORKS)
#define ELF_TARGET_FORMAT "elf32-i386-vxworks"
+#endif
+
+#ifdef TE_SOLARIS
+#define ELF_TARGET_FORMAT "elf32-i386-sol2"
+#define ELF_TARGET_FORMAT64 "elf64-x86-64-sol2"
#endif
#ifndef ELF_TARGET_FORMAT