Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Dec 2010 20:24:22 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r216200 - in projects/binutils-2.17: contrib/binutils/bfd contrib/binutils/gas/config contrib/binutils/ld/emulparams gnu/usr.bin/binutils/libbfd sys/boot/ia64/efi sys/boot/ia64/ski sys/...
Message-ID:  <201012052024.oB5KOMUF007051@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Sun Dec  5 20:24:22 2010
New Revision: 216200
URL: http://svn.freebsd.org/changeset/base/216200

Log:
  For ia64, add a proper 'elf64-ia64-freebsd' output format to BFD, so the
  ELF branding for FreeBSD is done in the same way as amd64, i386 and
  sparc.  Something similar should probably also be done for arm, mips and
  powerpc.

Modified:
  projects/binutils-2.17/contrib/binutils/bfd/elfxx-ia64.c
  projects/binutils-2.17/contrib/binutils/bfd/targets.c
  projects/binutils-2.17/contrib/binutils/gas/config/tc-ia64.c
  projects/binutils-2.17/contrib/binutils/ld/emulparams/elf64_ia64_fbsd.sh
  projects/binutils-2.17/gnu/usr.bin/binutils/libbfd/Makefile.ia64
  projects/binutils-2.17/sys/boot/ia64/efi/ldscript.ia64
  projects/binutils-2.17/sys/boot/ia64/ski/ldscript.ia64
  projects/binutils-2.17/sys/conf/ldscript.ia64

Modified: projects/binutils-2.17/contrib/binutils/bfd/elfxx-ia64.c
==============================================================================
--- projects/binutils-2.17/contrib/binutils/bfd/elfxx-ia64.c	Sun Dec  5 16:09:03 2010	(r216199)
+++ projects/binutils-2.17/contrib/binutils/bfd/elfxx-ia64.c	Sun Dec  5 20:24:22 2010	(r216200)
@@ -5909,6 +5909,26 @@ elfNN_hpux_backend_symbol_processing (bf
 
 #include "elfNN-target.h"
 
+/* FreeBSD support.  */
+
+#undef  TARGET_LITTLE_SYM
+#define TARGET_LITTLE_SYM		bfd_elfNN_ia64_freebsd_vec
+#undef  TARGET_LITTLE_NAME
+#define TARGET_LITTLE_NAME		"elfNN-ia64-freebsd"
+#undef  TARGET_BIG_SYM
+#undef  TARGET_BIG_NAME
+
+#undef  ELF_OSABI
+#define ELF_OSABI			ELFOSABI_FREEBSD
+
+#undef  elf_backend_post_process_headers
+#define elf_backend_post_process_headers _bfd_elf_set_osabi
+
+#undef  elfNN_bed
+#define elfNN_bed elfNN_ia64_fbsd_bed
+
+#include "elfNN-target.h"
+
 /* HPUX-specific vectors.  */
 
 #undef  TARGET_LITTLE_SYM

Modified: projects/binutils-2.17/contrib/binutils/bfd/targets.c
==============================================================================
--- projects/binutils-2.17/contrib/binutils/bfd/targets.c	Sun Dec  5 16:09:03 2010	(r216199)
+++ projects/binutils-2.17/contrib/binutils/bfd/targets.c	Sun Dec  5 20:24:22 2010	(r216200)
@@ -594,6 +594,7 @@ extern const bfd_target bfd_elf32_i860_l
 extern const bfd_target bfd_elf32_i860_vec;
 extern const bfd_target bfd_elf32_i960_vec;
 extern const bfd_target bfd_elf32_ia64_big_vec;
+extern const bfd_target bfd_elf64_ia64_freebsd_vec;
 extern const bfd_target bfd_elf32_ia64_hpux_big_vec;
 extern const bfd_target bfd_elf32_ip2k_vec;
 extern const bfd_target bfd_elf32_iq2000_vec;

Modified: projects/binutils-2.17/contrib/binutils/gas/config/tc-ia64.c
==============================================================================
--- projects/binutils-2.17/contrib/binutils/gas/config/tc-ia64.c	Sun Dec  5 16:09:03 2010	(r216199)
+++ projects/binutils-2.17/contrib/binutils/gas/config/tc-ia64.c	Sun Dec  5 20:24:22 2010	(r216200)
@@ -7704,8 +7704,10 @@ ia64_target_format ()
       else
 	{
 	  if (md.flags & EF_IA_64_ABI64)
-#ifdef TE_AIX50
+#if defined(TE_AIX50)
 	    return "elf64-ia64-aix-little";
+#elif defined(TE_FreeBSD)
+	    return "elf64-ia64-freebsd";
 #else
 	    return "elf64-ia64-little";
 #endif

Modified: projects/binutils-2.17/contrib/binutils/ld/emulparams/elf64_ia64_fbsd.sh
==============================================================================
--- projects/binutils-2.17/contrib/binutils/ld/emulparams/elf64_ia64_fbsd.sh	Sun Dec  5 16:09:03 2010	(r216199)
+++ projects/binutils-2.17/contrib/binutils/ld/emulparams/elf64_ia64_fbsd.sh	Sun Dec  5 20:24:22 2010	(r216200)
@@ -4,3 +4,4 @@ unset DATA_ADDR
 unset SMALL_DATA_CTOR
 unset SMALL_DATA_DTOR
 . ${srcdir}/emulparams/elf_fbsd.sh
+OUTPUT_FORMAT="elf64-ia64-freebsd"

Modified: projects/binutils-2.17/gnu/usr.bin/binutils/libbfd/Makefile.ia64
==============================================================================
--- projects/binutils-2.17/gnu/usr.bin/binutils/libbfd/Makefile.ia64	Sun Dec  5 16:09:03 2010	(r216199)
+++ projects/binutils-2.17/gnu/usr.bin/binutils/libbfd/Makefile.ia64	Sun Dec  5 20:24:22 2010	(r216200)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
-DEFAULT_VECTOR=	bfd_elf64_ia64_little_vec
+DEFAULT_VECTOR=	bfd_elf64_ia64_freebsd_vec
 
 SRCS+=	cofflink.c \
 	cpu-ia64.c \
@@ -18,13 +18,14 @@ SRCS+=	cofflink.c \
 
 VECS+=	${DEFAULT_VECTOR} \
 	bfd_efi_app_ia64_vec \
+	bfd_elf64_ia64_little_vec \
 	bfd_elf64_ia64_big_vec \
 	bfd_elf64_little_generic_vec bfd_elf64_big_generic_vec \
 	bfd_elf32_little_generic_vec bfd_elf32_big_generic_vec
 
 CLEANFILES+=	elf64-ia64.c pepigen.c pex64igen.c
 
-elf64-ia64.c: elf-fbsd-brand.c elfxx-ia64.c
+elf64-ia64.c: elfxx-ia64.c
 	sed -e s/NN/64/g ${.ALLSRC} > ${.TARGET}
 
 pepigen.c: peXXigen.c

Modified: projects/binutils-2.17/sys/boot/ia64/efi/ldscript.ia64
==============================================================================
--- projects/binutils-2.17/sys/boot/ia64/efi/ldscript.ia64	Sun Dec  5 16:09:03 2010	(r216199)
+++ projects/binutils-2.17/sys/boot/ia64/efi/ldscript.ia64	Sun Dec  5 20:24:22 2010	(r216200)
@@ -1,5 +1,5 @@
 /* $FreeBSD$ */
-OUTPUT_FORMAT("elf64-ia64-little", "elf64-ia64-little", "elf64-ia64-little")
+OUTPUT_FORMAT("elf64-ia64-freebsd", "elf64-ia64-freebsd", "elf64-ia64-freebsd")
 OUTPUT_ARCH(ia64)
 ENTRY(_start_plabel)
 SECTIONS

Modified: projects/binutils-2.17/sys/boot/ia64/ski/ldscript.ia64
==============================================================================
--- projects/binutils-2.17/sys/boot/ia64/ski/ldscript.ia64	Sun Dec  5 16:09:03 2010	(r216199)
+++ projects/binutils-2.17/sys/boot/ia64/ski/ldscript.ia64	Sun Dec  5 20:24:22 2010	(r216200)
@@ -1,5 +1,5 @@
 /* $FreeBSD$ */
-OUTPUT_FORMAT("elf64-ia64-little", "elf64-ia64-little", "elf64-ia64-little")
+OUTPUT_FORMAT("elf64-ia64-freebsd", "elf64-ia64-freebsd", "elf64-ia64-freebsd")
 OUTPUT_ARCH(ia64)
 ENTRY(_start)
 SECTIONS

Modified: projects/binutils-2.17/sys/conf/ldscript.ia64
==============================================================================
--- projects/binutils-2.17/sys/conf/ldscript.ia64	Sun Dec  5 16:09:03 2010	(r216199)
+++ projects/binutils-2.17/sys/conf/ldscript.ia64	Sun Dec  5 20:24:22 2010	(r216200)
@@ -1,5 +1,5 @@
 /* $FreeBSD$ */
-OUTPUT_FORMAT("elf64-ia64-little", "elf64-ia64-little", "elf64-ia64-little")
+OUTPUT_FORMAT("elf64-ia64-freebsd", "elf64-ia64-freebsd", "elf64-ia64-freebsd")
 OUTPUT_ARCH(ia64)
 ENTRY(__start)
 SEARCH_DIR(/usr/lib);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201012052024.oB5KOMUF007051>