This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] tweak FreeBSD branding.


2002-09-16  David O'Brien  <obrien@FreeBSD.org>

	* elf32-i386-fbsd.c: Always label using the EI_OSABI method.
	It is benign for FreeBSD < 4.1.  Minor reformatting.
	* elf64-alpha-fbsd.c: Likewise.


Index: elf32-i386-fbsd.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-i386-fbsd.c,v
retrieving revision 1.1
diff -u -r1.1 elf32-i386-fbsd.c
--- elf32-i386-fbsd.c	17 Sep 2002 02:24:34 -0000	1.1
+++ elf32-i386-fbsd.c	17 Sep 2002 02:28:46 -0000
@@ -17,11 +17,11 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
-#define TARGET_LITTLE_SYM		bfd_elf32_i386_freebsd_vec
-#define TARGET_LITTLE_NAME		"elf32-i386-freebsd"
-#define ELF_ARCH			bfd_arch_i386
-#define ELF_MACHINE_CODE		EM_386
-#define ELF_MAXPAGESIZE			0x1000
+#define TARGET_LITTLE_SYM	bfd_elf32_i386_freebsd_vec
+#define TARGET_LITTLE_NAME	"elf32-i386-freebsd"
+#define ELF_ARCH		bfd_arch_i386
+#define ELF_MACHINE_CODE	EM_386
+#define ELF_MAXPAGESIZE		0x1000
 
 #include "bfd.h"
 #include "sysdep.h"
@@ -43,12 +43,11 @@
 
   i_ehdrp = elf_elfheader (abfd);
 
+  /* Put an ABI label supported by FreeBSD >= 4.1.  */
+  i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_FREEBSD;
 #ifdef OLD_FREEBSD_ABI_LABEL
   /* The ABI label supported by FreeBSD <= 4.0 is quite nonstandard.  */
   memcpy (&i_ehdrp->e_ident[EI_ABIVERSION], "FreeBSD", 8);
-#else
-  /* Put an ABI label supported by FreeBSD >= 4.1.  */
-  i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_FREEBSD;
 #endif
 }
 
Index: elf64-alpha-fbsd.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-alpha-fbsd.c,v
retrieving revision 1.1
diff -u -r1.1 elf64-alpha-fbsd.c
--- elf64-alpha-fbsd.c	17 Sep 2002 02:24:34 -0000	1.1
+++ elf64-alpha-fbsd.c	17 Sep 2002 02:28:46 -0000
@@ -17,11 +17,11 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
-#define TARGET_LITTLE_SYM		bfd_elf64_alpha_freebsd_vec
-#define TARGET_LITTLE_NAME		"elf64-alpha-freebsd"
-#define ELF_ARCH			bfd_arch_alpha
-#define ELF_MACHINE_CODE		EM_ALPHA
-#define ELF_MAXPAGESIZE			0x10000
+#define TARGET_LITTLE_SYM	bfd_elf64_alpha_freebsd_vec
+#define TARGET_LITTLE_NAME	"elf64-alpha-freebsd"
+#define ELF_ARCH		bfd_arch_alpha
+#define ELF_MACHINE_CODE	EM_ALPHA
+#define ELF_MAXPAGESIZE		0x10000
 
 #include "bfd.h"
 #include "sysdep.h"
@@ -43,12 +43,11 @@
 
   i_ehdrp = elf_elfheader (abfd);
 
+  /* Put an ABI label supported by FreeBSD >= 4.1.  */
+  i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_FREEBSD;
 #ifdef OLD_FREEBSD_ABI_LABEL
   /* The ABI label supported by FreeBSD <= 4.0 is quite nonstandard.  */
   memcpy (&i_ehdrp->e_ident[EI_ABIVERSION], "FreeBSD", 8);
-#else
-  /* Put an ABI label supported by FreeBSD >= 4.1.  */
-  i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_FREEBSD;
 #endif
 }
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]