aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-mips.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2016-05-25 09:46:47 -0700
committerH.J. Lu <hjl.tools@gmail.com>2016-05-25 09:47:03 -0700
commite6cc316af931911da20249e19f9342e5cf8aeeff (patch)
treed43346d03bc137d6b7c22e87f39308b4cba4fd6b /bfd/elf64-mips.c
parentb95a0a3177bcf797c8f5ad6a7d276fb6275352b7 (diff)
downloadgdb-e6cc316af931911da20249e19f9342e5cf8aeeff.zip
gdb-e6cc316af931911da20249e19f9342e5cf8aeeff.tar.gz
gdb-e6cc316af931911da20249e19f9342e5cf8aeeff.tar.bz2
Enable 64-bit archives in ar and ranlib
Since existing ld and gold support the 64-bit (MIPS) ELF archives, we can use the 64-bit (MIPS) ELF archives as 64-bit archives. Since the plugin target is used to create archive in plugin-enabled ar, we need a way to enable 64-bit archives in the plugin target. This patch adds --enable-64-bit-archive to bfd to force 64-bit archives in ar and ranlib. Since both 64-bit MIPS and s390 ELF targets currently use 64-bit archives, 64-bit archives are enabled by default for them. 64-bit archive is generated automatically if the archive is too big. Tested on Linux/x86 and Linux/x86-64 with existing ld and gold. bfd/ PR binutils/14625 * archive.c (bfd_slurp_armap): Replace bfd_elf64_archive_slurp_armap with _bfd_archive_64_bit_slurp_armap. (bsd_write_armap): Call _bfd_archive_64_bit_write_armap if BFD64 is defined and the archive is too big. (coff_write_armap): Likewise. * archive64.c (bfd_elf64_archive_slurp_armap): Renamed to ... (_bfd_archive_64_bit_slurp_armap): This. (bfd_elf64_archive_write_armap): Renamed to ... (_bfd_archive_64_bit_write_armap): This. * configure.ac: Add --enable-64-bit-archive. (want_64_bit_archive): New. Set to true by default for 64-bit MIPS and s390 ELF targets. (USE_64_BIT_ARCHIVE): New AC_DEFINE. * config.in: Regenerated. * configure: Likewise. * elf64-mips.c (bfd_elf64_archive_functions): Removed. (bfd_elf64_archive_slurp_armap): Likewise. (bfd_elf64_archive_write_armap): Likewise. (bfd_elf64_archive_slurp_extended_name_table): Likewise. (bfd_elf64_archive_construct_extended_name_table): Likewise. (bfd_elf64_archive_truncate_arname): Likewise. (bfd_elf64_archive_read_ar_hdr): Likewise. (bfd_elf64_archive_write_ar_hdr): Likewise. (bfd_elf64_archive_openr_next_archived_file): Likewise. (bfd_elf64_archive_get_elt_at_index): Likewise. (bfd_elf64_archive_generic_stat_arch_elt): Likewise. (bfd_elf64_archive_update_armap_timestamp): Likewise. * elf64-s390.c (bfd_elf64_archive_functions): Removed. (bfd_elf64_archive_slurp_armap): Likewise. (bfd_elf64_archive_write_armap): Likewise. (bfd_elf64_archive_slurp_extended_name_table): Likewise. (bfd_elf64_archive_construct_extended_name_table): Likewise. (bfd_elf64_archive_truncate_arname): Likewise. (bfd_elf64_archive_read_ar_hdr): Likewise. (bfd_elf64_archive_write_ar_hdr): Likewise. (bfd_elf64_archive_openr_next_archived_file): Likewise. (bfd_elf64_archive_get_elt_at_index): Likewise. (bfd_elf64_archive_generic_stat_arch_elt): Likewise. (bfd_elf64_archive_update_armap_timestamp): Likewise. * elfxx-target.h (TARGET_BIG_SYM): Use _bfd_archive_64_bit on BFD_JUMP_TABLE_ARCHIVE if USE_64_BIT_ARCHIVE is defined and bfd_elfNN_archive_functions isn't defined. (TARGET_LITTLE_SYM): Likewise. * libbfd-in.h (_bfd_archive_64_bit_slurp_armap): New prototype. (_bfd_archive_64_bit_write_armap): Likewise. (_bfd_archive_64_bit_slurp_extended_name_table): New macro. (_bfd_archive_64_bit_construct_extended_name_table): Likewise. (_bfd_archive_64_bit_truncate_arname): Likewise. (_bfd_archive_64_bit_read_ar_hdr): Likewise. (_bfd_archive_64_bit_write_ar_hdr): Likewise. (_bfd_archive_64_bit_openr_next_archived_file): Likewise. (_bfd_archive_64_bit_get_elt_at_index): Likewise. (_bfd_archive_64_bit_generic_stat_arch_elt): Likewise. (_bfd_archive_64_bit_update_armap_timestamp): Likewise. * libbfd.h: Regenerated. * plugin.c (plugin_vec): Use _bfd_archive_64_bit on BFD_JUMP_TABLE_ARCHIVE if USE_64_BIT_ARCHIVE is defined. binutils/ PR binutils/14625 * NEWS: Mention --enable-64-bit-archive.
Diffstat (limited to 'bfd/elf64-mips.c')
-rw-r--r--bfd/elf64-mips.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/bfd/elf64-mips.c b/bfd/elf64-mips.c
index 6bedebc..34144f0 100644
--- a/bfd/elf64-mips.c
+++ b/bfd/elf64-mips.c
@@ -4478,29 +4478,6 @@ const struct elf_size_info mips_elf64_size_info =
#define bfd_elf64_bfd_relax_section _bfd_mips_relax_section
#define bfd_elf64_mkobject _bfd_mips_elf_mkobject
-/* MIPS ELF64 archive functions. */
-#define bfd_elf64_archive_functions
-extern bfd_boolean bfd_elf64_archive_slurp_armap
- (bfd *);
-extern bfd_boolean bfd_elf64_archive_write_armap
- (bfd *, unsigned int, struct orl *, unsigned int, int);
-#define bfd_elf64_archive_slurp_extended_name_table \
- _bfd_archive_coff_slurp_extended_name_table
-#define bfd_elf64_archive_construct_extended_name_table \
- _bfd_archive_coff_construct_extended_name_table
-#define bfd_elf64_archive_truncate_arname \
- _bfd_archive_coff_truncate_arname
-#define bfd_elf64_archive_read_ar_hdr _bfd_archive_coff_read_ar_hdr
-#define bfd_elf64_archive_write_ar_hdr _bfd_archive_coff_write_ar_hdr
-#define bfd_elf64_archive_openr_next_archived_file \
- _bfd_archive_coff_openr_next_archived_file
-#define bfd_elf64_archive_get_elt_at_index \
- _bfd_archive_coff_get_elt_at_index
-#define bfd_elf64_archive_generic_stat_arch_elt \
- _bfd_archive_coff_generic_stat_arch_elt
-#define bfd_elf64_archive_update_armap_timestamp \
- _bfd_archive_coff_update_armap_timestamp
-
/* The SGI style (n)64 NewABI. */
#define TARGET_LITTLE_SYM mips_elf64_le_vec
#define TARGET_LITTLE_NAME "elf64-littlemips"