aboutsummaryrefslogtreecommitdiff
path: root/bfd/bfd-in.h
diff options
context:
space:
mode:
authorYufeng Zhang <yufeng.zhang@arm.com>2013-06-26 10:41:42 +0000
committerYufeng Zhang <yufeng.zhang@arm.com>2013-06-26 10:41:42 +0000
commitcec5225bd81f750984856603755854f0f5796ab1 (patch)
treeffb2ca80692dcd0fa3764f4042b7f515efa6f11e /bfd/bfd-in.h
parent811971141320a4b6a6af86c9efc9a48418accaab (diff)
downloadgdb-cec5225bd81f750984856603755854f0f5796ab1.zip
gdb-cec5225bd81f750984856603755854f0f5796ab1.tar.gz
gdb-cec5225bd81f750984856603755854f0f5796ab1.tar.bz2
[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/bfd-in.h')
-rw-r--r--bfd/bfd-in.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
index 03cac6e..579b007 100644
--- a/bfd/bfd-in.h
+++ b/bfd/bfd-in.h
@@ -933,9 +933,15 @@ extern unsigned int _bfd_elf_ppc_at_tprel_transform
extern void bfd_elf64_aarch64_init_maps
(bfd *);
+extern void bfd_elf32_aarch64_init_maps
+ (bfd *);
+
extern void bfd_elf64_aarch64_set_options
(bfd *, struct bfd_link_info *, int, int, int);
+extern void bfd_elf32_aarch64_set_options
+ (bfd *, struct bfd_link_info *, int, int, int);
+
/* ELF AArch64 mapping symbol support. */
#define BFD_AARCH64_SPECIAL_SYM_TYPE_MAP (1 << 0)
#define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1)
@@ -944,7 +950,7 @@ extern void bfd_elf64_aarch64_set_options
extern bfd_boolean bfd_is_aarch64_special_symbol_name
(const char * name, int type);
-/* AArch64 stub generation support. Called from the linker. */
+/* AArch64 stub generation support for ELF64. Called from the linker. */
extern int elf64_aarch64_setup_section_lists
(bfd *, struct bfd_link_info *);
extern void elf64_aarch64_next_input_section
@@ -955,6 +961,18 @@ extern bfd_boolean elf64_aarch64_size_stubs
void (*) (void));
extern bfd_boolean elf64_aarch64_build_stubs
(struct bfd_link_info *);
+/* AArch64 stub generation support for ELF32. Called from the linker. */
+extern int elf32_aarch64_setup_section_lists
+ (bfd *, struct bfd_link_info *);
+extern void elf32_aarch64_next_input_section
+ (struct bfd_link_info *, struct bfd_section *);
+extern bfd_boolean elf32_aarch64_size_stubs
+ (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma,
+ struct bfd_section * (*) (const char *, struct bfd_section *),
+ void (*) (void));
+extern bfd_boolean elf32_aarch64_build_stubs
+ (struct bfd_link_info *);
+
/* TI COFF load page support. */
extern void bfd_ticoff_set_section_load_page