summaryrefslogtreecommitdiff
path: root/bfd/Makefile.am
diff options
context:
space:
mode:
authorYufeng Zhang <yufeng.zhang@arm.com>2013-06-26 10:41:41 +0000
committerYufeng Zhang <yufeng.zhang@arm.com>2013-06-26 10:41:41 +0000
commitd66a510d9bc25d82d0a419f9e1389e78c0d773f3 (patch)
tree366aa107f86c2c147c961f91175d275c192b3e5e /bfd/Makefile.am
parent7a82825a46bfea6cdc33b8a4907e9862d91db683 (diff)
downloadbinutils-redhat-d66a510d9bc25d82d0a419f9e1389e78c0d773f3.tar.gz
[AArch64, ILP32] 2/6 Parametrize elfnn-aarch64.c and add basic support in ld
and gas. bfd/ * Makefile.am (BFD64_BACKENDS): Add elf32-aarch64.lo. (BUILD_CFILES): Add elf32-aarch64.c. (elf32-aarch64.c): New rule for generating from elfnn-aarch64.c. * Makefile.in: Re-generated. * archures.c (bfd_mach_aarch64_ilp32): New define. * bfd-in.h (bfd_elf32_aarch64_init_maps): New declaration. (bfd_elf32_aarch64_set_options): Ditto. (elf32_aarch64_setup_section_lists): Ditto. (elf32_aarch64_next_input_section): Ditto. (elf32_aarch64_size_stubs): Ditto. (elf32_aarch64_build_stubs): Ditto. * bfd-in2.h: Re-generated. * config.bfd (aarch64-*-elf): Add bfd_elf32_littleaarch64_vec and bfd_elf32_bigaarch64_vec. (aarch64-*-linux*): Likewise. (aarch64_be-*-elf): Likewise. (aarch64_be-*-linux*): Likewise. * configure.in (bfd_elf32_bigaarch64_vec) (bfd_elf32_littleaarch64_vec): New. * configure: Re-generated. * cpu-aarch64.c (compatible): Don't allow mixing ilp32 objects with lp64 ones. (bfd_aarch64_arch_ilp32): New. (bfd_aarch64_arch): Link to bfd_aarch64_arch_ilp32. * elfnn-aarch64.c (ARCH_SIZE): New define. (AARCH64_R, AARCH64_R_STR, LOG_FILE_ALIGN): New defines. (GOT_ENTRY_SIZE): Re-define as (ARCH_SIZE / 8). (elf64_aarch64_*): Rename to elfNN_aarch64_*. (ELF64_R_*): Rename to ELFNN_R_*. Plus other paramaterization. * targets.c (bfd_elf32_bigaarch64_vec, bfd_elf32_littleaarch64_vec): New declarations. (_bfd_target_vector): Add bfd_elf32_bigaarch64_vec and bfd_elf32_littleaarch64_vec. gas/ * config/tc-aarch64.c (ilp32_p): New static variable. (elf64_aarch64_target_format): Return the target according to the value of 'ilp32_p'. (md_begin): Determine 'mach' according to the value of 'ilp32_p'. (aarch64_opts): Add support for options '-milp32' and '-mlp64'. (aarch64_dwarf2_addr_size): New function. * config/tc-aarch64.h (aarch64_dwarf2_addr_size): New declaration. (DWARF2_ADDR_SIZE): New define. ld/ * Makefile.am (ALL_64_EMULATION_SOURCES): Add eaarch64elf32.c. (eaarch64elf32.c): New dependency and rule. * Makefile.in: Re-generated. * configure.tgt (aarch64-*-elf): Add aarch64elf32. (aarch64_be-*-elf, aarch64_be-*-linux*, aarch64-*-linux*): Likewise. * emulparams/aarch64elf32.sh: New file.
Diffstat (limited to 'bfd/Makefile.am')
-rw-r--r--bfd/Makefile.am8
1 files changed, 7 insertions, 1 deletions
diff --git a/bfd/Makefile.am b/bfd/Makefile.am
index 5ed9bc76e0..58fb6d6cac 100644
--- a/bfd/Makefile.am
+++ b/bfd/Makefile.am
@@ -638,6 +638,7 @@ BFD32_BACKENDS_CFILES = \
# elf32-ia64.c requires a 64-bit bfd_vma, and hence can not be put in
# BFD32_BACKENDS.
BFD64_BACKENDS = \
+ elf32-aarch64.lo \
elf64-aarch64.lo \
aix5ppc-core.lo \
aout64.lo \
@@ -763,7 +764,7 @@ SOURCE_CFILES = \
$(OPTIONAL_BACKENDS_CFILES)
BUILD_CFILES = \
- elf64-aarch64.c \
+ elf32-aarch64.c elf64-aarch64.c \
elf32-ia64.c elf64-ia64.c peigen.c pepigen.c pex64igen.c
CFILES = $(SOURCE_CFILES) $(BUILD_CFILES)
@@ -912,6 +913,11 @@ elf64-target.h : elfxx-target.h
sed -e s/NN/64/g < $(srcdir)/elfxx-target.h > elf64-target.new
mv -f elf64-target.new elf64-target.h
+elf32-aarch64.c : elfnn-aarch64.c
+ rm -f elf32-aarch64.c
+ sed -e s/NN/32/g < $(srcdir)/elfnn-aarch64.c > elf32-aarch64.new
+ mv -f elf32-aarch64.new elf32-aarch64.c
+
elf64-aarch64.c : elfnn-aarch64.c
rm -f elf64-aarch64.c
sed -e s/NN/64/g < $(srcdir)/elfnn-aarch64.c > elf64-aarch64.new