Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/gnu/dist/toolchain * Add 2 new BFD targets, "elf32-littlearm...
details: https://anonhg.NetBSD.org/src/rev/e8b76f75f842
branches: trunk
changeset: 524894:e8b76f75f842
user: thorpej <thorpej%NetBSD.org@localhost>
date: Mon Apr 01 19:53:05 2002 +0000
description:
* Add 2 new BFD targets, "elf32-littlearm-nbsd" and "elf32-bigarm-nbsd".
These targets are identical to the non-nbsd versions except that they
mark resulting ELF objects and executables as OSABI_NETBSD version 0.
* Add big-endian ARM BFD vectors to arm-*-netbsdelf. Make the -nbsd
BFD target the default for arm-*-netbsdelf.
diffstat:
gnu/dist/toolchain/bfd/config.bfd | 4 +-
gnu/dist/toolchain/bfd/configure | 6 +++-
gnu/dist/toolchain/bfd/configure.in | 6 +++-
gnu/dist/toolchain/bfd/elf32-arm.h | 10 +++++++++
gnu/dist/toolchain/bfd/elfarm-nabi.c | 27 ++++++++++++++++++++----
gnu/dist/toolchain/bfd/targets.c | 4 +++
gnu/dist/toolchain/gas/config/tc-arm.c | 8 +++++++
gnu/dist/toolchain/ld/emulparams/armelf_nbsd.sh | 6 ++--
8 files changed, 57 insertions(+), 14 deletions(-)
diffs (194 lines):
diff -r 223ad1e075ce -r e8b76f75f842 gnu/dist/toolchain/bfd/config.bfd
--- a/gnu/dist/toolchain/bfd/config.bfd Mon Apr 01 19:12:16 2002 +0000
+++ b/gnu/dist/toolchain/bfd/config.bfd Mon Apr 01 19:53:05 2002 +0000
@@ -105,8 +105,8 @@
;;
arm-*-netbsdelf*)
- targ_defvec=bfd_elf32_littlearm_vec
- targ_selvecs=armnetbsd_vec
+ targ_defvec=bfd_elf32_littlearm_nbsd_vec
+ targ_selvecs="bfd_elf32_littlearm_vec bfd_elf32_bigarm_vec bfd_elf32_bigarm_nbsd_vec armnetbsd_vec"
;;
arm-*-netbsd*)
targ_defvec=armnetbsd_vec
diff -r 223ad1e075ce -r e8b76f75f842 gnu/dist/toolchain/bfd/configure
--- a/gnu/dist/toolchain/bfd/configure Mon Apr 01 19:12:16 2002 +0000
+++ b/gnu/dist/toolchain/bfd/configure Mon Apr 01 19:53:05 2002 +0000
@@ -5930,10 +5930,12 @@
bfd_elf32_ia64_big_vec) tb="$tb elf32-ia64.lo elf32.lo $elf" ;;
bfd_elf32_avr_vec) tb="$tb elf32-avr.lo elf32.lo $elf" ;;
bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
- bfd_elf32_littlearm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
+ bfd_elf32_littlearm_vec | bfd_elf32_littlearm_nbsd_vec)
+ tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
- bfd_elf32_bigarm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
+ bfd_elf32_bigarm_vec | bfd_elf32_bigarm_nbsd_vec)
+ tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
bfd_elf32_bigarm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
bfd_elf32_big_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
diff -r 223ad1e075ce -r e8b76f75f842 gnu/dist/toolchain/bfd/configure.in
--- a/gnu/dist/toolchain/bfd/configure.in Mon Apr 01 19:12:16 2002 +0000
+++ b/gnu/dist/toolchain/bfd/configure.in Mon Apr 01 19:53:05 2002 +0000
@@ -503,10 +503,12 @@
bfd_elf32_ia64_big_vec) tb="$tb elf32-ia64.lo elf32.lo $elf" ;;
bfd_elf32_avr_vec) tb="$tb elf32-avr.lo elf32.lo $elf" ;;
bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
- bfd_elf32_littlearm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
+ bfd_elf32_littlearm_vec | bfd_elf32_littlearm_nbsd_vec)
+ tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
bfd_elf32_bigarc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
- bfd_elf32_bigarm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
+ bfd_elf32_bigarm_vec | bfd_elf32_bigarm_nbsd_vec)
+ tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
bfd_elf32_bigarm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
bfd_elf32_big_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
diff -r 223ad1e075ce -r e8b76f75f842 gnu/dist/toolchain/bfd/elf32-arm.h
--- a/gnu/dist/toolchain/bfd/elf32-arm.h Mon Apr 01 19:12:16 2002 +0000
+++ b/gnu/dist/toolchain/bfd/elf32-arm.h Mon Apr 01 19:53:05 2002 +0000
@@ -3399,6 +3399,16 @@
i_ehdrp = elf_elfheader (abfd);
+#ifdef ARM_ELF_OS_ABI_VERSION_NBSD
+ if (strcmp (bfd_get_target (abfd), "elf32-littlearm-nbsd") == 0
+ || strcmp (bfd_get_target (abfd), "elf32-bigarm-nbsd") == 0)
+ {
+ i_ehdrp->e_ident[EI_OSABI] = ARM_ELF_OS_ABI_VERSION_NBSD;
+ i_ehdrp->e_ident[EI_ABIVERSION] = ARM_ELF_ABI_VERSION_NBSD;
+ return;
+ }
+#endif
+
i_ehdrp->e_ident[EI_OSABI] = ARM_ELF_OS_ABI_VERSION;
i_ehdrp->e_ident[EI_ABIVERSION] = ARM_ELF_ABI_VERSION;
}
diff -r 223ad1e075ce -r e8b76f75f842 gnu/dist/toolchain/bfd/elfarm-nabi.c
--- a/gnu/dist/toolchain/bfd/elfarm-nabi.c Mon Apr 01 19:12:16 2002 +0000
+++ b/gnu/dist/toolchain/bfd/elfarm-nabi.c Mon Apr 01 19:53:05 2002 +0000
@@ -29,17 +29,15 @@
#define USE_REL
-#define TARGET_LITTLE_SYM bfd_elf32_littlearm_vec
-#define TARGET_LITTLE_NAME "elf32-littlearm"
-#define TARGET_BIG_SYM bfd_elf32_bigarm_vec
-#define TARGET_BIG_NAME "elf32-bigarm"
-
#define elf_info_to_howto 0
#define elf_info_to_howto_rel elf32_arm_info_to_howto
#define ARM_ELF_ABI_VERSION 0
#define ARM_ELF_OS_ABI_VERSION ELFOSABI_ARM
+#define ARM_ELF_ABI_VERSION_NBSD 0
+#define ARM_ELF_OS_ABI_VERSION_NBSD ELFOSABI_NETBSD
+
static reloc_howto_type * elf32_arm_reloc_type_lookup
PARAMS ((bfd * abfd, bfd_reloc_code_real_type code));
@@ -674,4 +672,23 @@
}
}
+#define TARGET_LITTLE_SYM bfd_elf32_littlearm_vec
+#define TARGET_LITTLE_NAME "elf32-littlearm"
+#define TARGET_BIG_SYM bfd_elf32_bigarm_vec
+#define TARGET_BIG_NAME "elf32-bigarm"
+
#include "elf32-arm.h"
+
+#define INCLUDED_TARGET_FILE 1
+
+#undef TARGET_LITTLE_SYM
+#undef TARGET_LITTLE_NAME
+#undef TARGET_BIG_SYM
+#undef TARGET_BIG_NAME
+
+#define TARGET_LITTLE_SYM bfd_elf32_littlearm_nbsd_vec
+#define TARGET_LITTLE_NAME "elf32-littlearm-nbsd"
+#define TARGET_BIG_SYM bfd_elf32_bigarm_nbsd_vec
+#define TARGET_BIG_NAME "elf32-bigarm-nbsd"
+
+#include "elf32-target.h"
diff -r 223ad1e075ce -r e8b76f75f842 gnu/dist/toolchain/bfd/targets.c
--- a/gnu/dist/toolchain/bfd/targets.c Mon Apr 01 19:12:16 2002 +0000
+++ b/gnu/dist/toolchain/bfd/targets.c Mon Apr 01 19:53:05 2002 +0000
@@ -512,6 +512,7 @@
extern const bfd_target bfd_elf32_bigarc_vec;
extern const bfd_target bfd_elf32_bigarm_oabi_vec;
extern const bfd_target bfd_elf32_bigarm_vec;
+extern const bfd_target bfd_elf32_bigarm_nbsd_vec;
extern const bfd_target bfd_elf32_bigmips_vec;
extern const bfd_target bfd_elf32_cris_vec;
extern const bfd_target bfd_elf32_d10v_vec;
@@ -529,6 +530,7 @@
extern const bfd_target bfd_elf32_littlearc_vec;
extern const bfd_target bfd_elf32_littlearm_oabi_vec;
extern const bfd_target bfd_elf32_littlearm_vec;
+extern const bfd_target bfd_elf32_littlearm_nbsd_vec;
extern const bfd_target bfd_elf32_littlemips_vec;
extern const bfd_target bfd_elf32_m32r_vec;
extern const bfd_target bfd_elf32_m68hc11_vec;
@@ -736,6 +738,7 @@
&bfd_elf32_avr_vec,
&bfd_elf32_bigarc_vec,
&bfd_elf32_bigarm_vec,
+ &bfd_elf32_bigarm_nbsd_vec,
&bfd_elf32_bigarm_oabi_vec,
&bfd_elf32_bigmips_vec,
#ifdef BFD64
@@ -758,6 +761,7 @@
&bfd_elf32_little_generic_vec,
&bfd_elf32_littlearc_vec,
&bfd_elf32_littlearm_vec,
+ &bfd_elf32_littlearm_nbsd_vec,
&bfd_elf32_littlearm_oabi_vec,
&bfd_elf32_littlemips_vec,
#ifdef BFD64
diff -r 223ad1e075ce -r e8b76f75f842 gnu/dist/toolchain/gas/config/tc-arm.c
--- a/gnu/dist/toolchain/gas/config/tc-arm.c Mon Apr 01 19:12:16 2002 +0000
+++ b/gnu/dist/toolchain/gas/config/tc-arm.c Mon Apr 01 19:53:05 2002 +0000
@@ -8959,14 +8959,22 @@
if (target_oabi)
return "elf32-bigarm-oabi";
else
+#ifdef TE_NetBSD
+ return "elf32-bigarm-nbsd";
+#else
return "elf32-bigarm";
+#endif
}
else
{
if (target_oabi)
return "elf32-littlearm-oabi";
else
+#ifdef TE_NetBSD
+ return "elf32-littlearm-nbsd";
+#else
return "elf32-littlearm";
+#endif
}
}
diff -r 223ad1e075ce -r e8b76f75f842 gnu/dist/toolchain/ld/emulparams/armelf_nbsd.sh
--- a/gnu/dist/toolchain/ld/emulparams/armelf_nbsd.sh Mon Apr 01 19:12:16 2002 +0000
+++ b/gnu/dist/toolchain/ld/emulparams/armelf_nbsd.sh Mon Apr 01 19:53:05 2002 +0000
@@ -1,8 +1,8 @@
ARCH=arm
SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-littlearm"
-BIG_OUTPUT_FORMAT="elf32-bigarm"
-LITTLE_OUTPUT_FORMAT="elf32-littlearm"
+OUTPUT_FORMAT="elf32-littlearm-nbsd"
+BIG_OUTPUT_FORMAT="elf32-bigarm-nbsd"
+LITTLE_OUTPUT_FORMAT="elf32-littlearm-nbsd"
MAXPAGESIZE=0x8000
TEMPLATE_NAME=elf32
EXTRA_EM_FILE=armelf
Home |
Main Index |
Thread Index |
Old Index