elf_hash_table_id access

* elf-m10300.c (elf32_mn10300_hash_table): Test is_elf_hash_table
	before accessing elf_hash_table_id.
	* elf32-arc.c (elf_arc_hash_table): Likewise.
	* elf32-arm.c (elf32_arm_hash_table): Likewise.
	* elf32-avr.c (avr_link_hash_table): Likewise.
	* elf32-bfin.c (bfinfdpic_hash_table): Likewise.
	* elf32-cris.c (elf_cris_hash_table): Likewise.
	* elf32-csky.c (csky_elf_hash_table): Likewise.
	* elf32-frv.c (frvfdpic_hash_table): Likewise.
	* elf32-hppa.c (hppa_link_hash_table): Likewise.
	* elf32-lm32.c (lm32_elf_hash_table): Likewise.
	* elf32-m32r.c (m32r_elf_hash_table): Likewise.
	* elf32-m68hc1x.h (m68hc11_elf_hash_table): Likewise.
	* elf32-m68k.c (elf_m68k_hash_table): Likewise.
	* elf32-metag.c (metag_link_hash_table): Likewise.
	* elf32-microblaze.c (elf32_mb_hash_table): Likewise.
	* elf32-nds32.h (nds32_elf_hash_table): Likewise.
	* elf32-or1k.c (or1k_elf_hash_table): Likewise.
	* elf32-s390.c (elf_s390_hash_table): Likewise.
	* elf32-sh.c (sh_elf_hash_table): Likewise.
	* elf32-spu.c (spu_hash_table): Likewise.
	* elf32-tilepro.c (tilepro_elf_hash_table): Likewise.
	* elf32-xtensa.c (elf_xtensa_hash_table): Likewise.
	* elf64-alpha.c (alpha_elf_hash_table): Likewise.
	* elf64-hppa.c (hppa_link_hash_table): Likewise.
	* elf64-ia64-vms.c (elf64_ia64_hash_table): Likewise.
	* elf64-s390.c (elf_s390_hash_table): Likewise.
	* elfnn-ia64.c (elfNN_ia64_hash_table): Likewise.
	* elfnn-riscv.c (riscv_elf_hash_table): Likewise.
	* elfxx-mips.c (mips_elf_hash_table): Likewise.
	* elfxx-sparc.h (_bfd_sparc_elf_hash_table): Likewise.
	* elfxx-tilegx.c (tilegx_elf_hash_table): Likewise.
This commit is contained in:
Alan Modra 2020-08-25 02:37:02 +09:30
parent 3cdad0846b
commit 0f55320bc4
32 changed files with 133 additions and 72 deletions

View File

@ -1,3 +1,38 @@
2020-08-25 Alan Modra <amodra@gmail.com>
* elf-m10300.c (elf32_mn10300_hash_table): Test is_elf_hash_table
before accessing elf_hash_table_id.
* elf32-arc.c (elf_arc_hash_table): Likewise.
* elf32-arm.c (elf32_arm_hash_table): Likewise.
* elf32-avr.c (avr_link_hash_table): Likewise.
* elf32-bfin.c (bfinfdpic_hash_table): Likewise.
* elf32-cris.c (elf_cris_hash_table): Likewise.
* elf32-csky.c (csky_elf_hash_table): Likewise.
* elf32-frv.c (frvfdpic_hash_table): Likewise.
* elf32-hppa.c (hppa_link_hash_table): Likewise.
* elf32-lm32.c (lm32_elf_hash_table): Likewise.
* elf32-m32r.c (m32r_elf_hash_table): Likewise.
* elf32-m68hc1x.h (m68hc11_elf_hash_table): Likewise.
* elf32-m68k.c (elf_m68k_hash_table): Likewise.
* elf32-metag.c (metag_link_hash_table): Likewise.
* elf32-microblaze.c (elf32_mb_hash_table): Likewise.
* elf32-nds32.h (nds32_elf_hash_table): Likewise.
* elf32-or1k.c (or1k_elf_hash_table): Likewise.
* elf32-s390.c (elf_s390_hash_table): Likewise.
* elf32-sh.c (sh_elf_hash_table): Likewise.
* elf32-spu.c (spu_hash_table): Likewise.
* elf32-tilepro.c (tilepro_elf_hash_table): Likewise.
* elf32-xtensa.c (elf_xtensa_hash_table): Likewise.
* elf64-alpha.c (alpha_elf_hash_table): Likewise.
* elf64-hppa.c (hppa_link_hash_table): Likewise.
* elf64-ia64-vms.c (elf64_ia64_hash_table): Likewise.
* elf64-s390.c (elf_s390_hash_table): Likewise.
* elfnn-ia64.c (elfNN_ia64_hash_table): Likewise.
* elfnn-riscv.c (riscv_elf_hash_table): Likewise.
* elfxx-mips.c (mips_elf_hash_table): Likewise.
* elfxx-sparc.h (_bfd_sparc_elf_hash_table): Likewise.
* elfxx-tilegx.c (tilegx_elf_hash_table): Likewise.
2020-08-21 Jon Turney <jon.turney@dronecode.org.uk>
* elf.c (elfcore_grok_win32pstatus): Change name_size to unsigned

View File

@ -128,8 +128,9 @@ struct elf_mn10300_obj_tdata
/* Get the MN10300 ELF linker hash table from a link_info structure. */
#define elf32_mn10300_hash_table(p) \
(elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
== MN10300_ELF_DATA ? ((struct elf32_mn10300_link_hash_table *) ((p)->hash)) : NULL)
((is_elf_hash_table ((p)->hash) \
&& elf_hash_table_id (elf_hash_table (p)) == MN10300_ELF_DATA) \
? (struct elf32_mn10300_link_hash_table *) (p)->hash : NULL)
#define elf32_mn10300_link_hash_traverse(table, func, info) \
(elf_link_hash_traverse \

View File

@ -1939,8 +1939,9 @@ elf_arc_relocate_section (bfd * output_bfd,
}
#define elf_arc_hash_table(p) \
(elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
== ARC_ELF_DATA ? ((struct elf_arc_link_hash_table *) ((p)->hash)) : NULL)
((is_elf_hash_table ((p)->hash) \
&& elf_hash_table_id (elf_hash_table (p)) == ARC_ELF_DATA) \
? (struct elf_arc_link_hash_table *) (p)->hash : NULL)
static bfd_boolean
elf_arc_check_relocs (bfd * abfd,

View File

@ -3255,9 +3255,10 @@ struct elf32_arm_link_hash_entry
(info)))
/* Get the ARM elf linker hash table from a link_info structure. */
#define elf32_arm_hash_table(info) \
(elf_hash_table_id ((struct elf_link_hash_table *) ((info)->hash)) \
== ARM_ELF_DATA ? ((struct elf32_arm_link_hash_table *) ((info)->hash)) : NULL)
#define elf32_arm_hash_table(p) \
((is_elf_hash_table ((p)->hash) \
&& elf_hash_table_id (elf_hash_table (p)) == ARM_ELF_DATA) \
? (struct elf32_arm_link_hash_table *) (p)->hash : NULL)
#define arm_stub_hash_lookup(table, string, create, copy) \
((struct elf32_arm_stub_hash_entry *) \

View File

@ -106,9 +106,9 @@ struct elf32_avr_link_hash_table
/* Various hash macros and functions. */
#define avr_link_hash_table(p) \
/* PR 3874: Check that we have an AVR style hash table before using it. */\
(elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
== AVR_ELF_DATA ? ((struct elf32_avr_link_hash_table *) ((p)->hash)) : NULL)
((is_elf_hash_table ((p)->hash) \
&& elf_hash_table_id (elf_hash_table (p)) == AVR_ELF_DATA) \
? (struct elf32_avr_link_hash_table *) (p)->hash : NULL)
#define avr_stub_hash_entry(ent) \
((struct elf32_avr_stub_hash_entry *)(ent))

View File

@ -1668,9 +1668,10 @@ struct bfinfdpic_elf_link_hash_table
/* Get the Blackfin ELF linker hash table from a link_info structure. */
#define bfinfdpic_hash_table(info) \
(elf_hash_table_id ((struct elf_link_hash_table *) ((info)->hash)) \
== BFIN_ELF_DATA ? ((struct bfinfdpic_elf_link_hash_table *) ((info)->hash)) : NULL)
#define bfinfdpic_hash_table(p) \
((is_elf_hash_table ((p)->hash) \
&& elf_hash_table_id (elf_hash_table (p)) == BFIN_ELF_DATA) \
? (struct bfinfdpic_elf_link_hash_table *) (p)->hash : NULL)
#define bfinfdpic_got_section(info) \
(bfinfdpic_hash_table (info)->elf.sgot)

View File

@ -837,8 +837,9 @@ struct elf_cris_link_hash_table
/* Get the CRIS ELF linker hash table from a link_info structure. */
#define elf_cris_hash_table(p) \
(elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
== CRIS_ELF_DATA ? ((struct elf_cris_link_hash_table *) ((p)->hash)) : NULL)
((is_elf_hash_table ((p)->hash) \
&& elf_hash_table_id (elf_hash_table (p)) == CRIS_ELF_DATA) \
? (struct elf_cris_link_hash_table *) (p)->hash : NULL)
/* Get the CRIS ELF linker hash entry from a regular hash entry (the
"parent class"). The .root reference is just a simple type

View File

@ -1184,11 +1184,10 @@ struct csky_elf_link_hash_entry
(info)))
/* Get the C-SKY ELF linker hash table from a link_info structure. */
#define csky_elf_hash_table(info) \
((elf_hash_table_id ((struct elf_link_hash_table *) ((info)->hash)) \
== CSKY_ELF_DATA) \
? ((struct csky_elf_link_hash_table *) ((info)->hash)) \
: NULL)
#define csky_elf_hash_table(p) \
((is_elf_hash_table ((p)->hash) \
&& elf_hash_table_id (elf_hash_table (p)) == CSKY_ELF_DATA) \
? (struct csky_elf_link_hash_table *) (p)->hash : NULL)
#define csky_elf_hash_entry(ent) ((struct csky_elf_link_hash_entry*)(ent))

View File

@ -826,8 +826,9 @@ struct frvfdpic_elf_link_hash_table
/* Get the FRV ELF linker hash table from a link_info structure. */
#define frvfdpic_hash_table(p) \
(elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
== FRV_ELF_DATA ? ((struct frvfdpic_elf_link_hash_table *) ((p)->hash)) : NULL)
((is_elf_hash_table ((p)->hash) \
&& elf_hash_table_id (elf_hash_table (p)) == FRV_ELF_DATA) \
? (struct frvfdpic_elf_link_hash_table *) (p)->hash : NULL)
#define frvfdpic_got_section(info) \
(frvfdpic_hash_table (info)->elf.sgot)

View File

@ -296,8 +296,9 @@ struct elf32_hppa_link_hash_table
/* Various hash macros and functions. */
#define hppa_link_hash_table(p) \
(elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
== HPPA32_ELF_DATA ? ((struct elf32_hppa_link_hash_table *) ((p)->hash)) : NULL)
((is_elf_hash_table ((p)->hash) \
&& elf_hash_table_id (elf_hash_table (p)) == HPPA32_ELF_DATA) \
? (struct elf32_hppa_link_hash_table *) (p)->hash : NULL)
#define hppa_elf_hash_entry(ent) \
((struct elf32_hppa_link_hash_entry *)(ent))

View File

@ -67,8 +67,9 @@ struct elf_lm32_link_hash_table
/* Get the lm32 ELF linker hash table from a link_info structure. */
#define lm32_elf_hash_table(p) \
(elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
== LM32_ELF_DATA ? ((struct elf_lm32_link_hash_table *) ((p)->hash)) : NULL)
((is_elf_hash_table ((p)->hash) \
&& elf_hash_table_id (elf_hash_table (p)) == LM32_ELF_DATA) \
? (struct elf_lm32_link_hash_table *) (p)->hash : NULL)
#define lm32fdpic_got_section(info) \
(lm32_elf_hash_table (info)->root.sgot)

View File

@ -1509,8 +1509,9 @@ struct elf_m32r_pcrel_relocs_copied
/* Get the m32r ELF linker hash table from a link_info structure. */
#define m32r_elf_hash_table(p) \
(elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
== M32R_ELF_DATA ? ((struct elf_link_hash_table *) ((p)->hash)) : NULL)
((is_elf_hash_table ((p)->hash) \
&& elf_hash_table_id (elf_hash_table (p)) == M32R_ELF_DATA) \
? (struct elf_link_hash_table *) (p)->hash : NULL)
/* Create an m32r ELF linker hash table. */

View File

@ -127,8 +127,9 @@ struct m68hc11_elf_link_hash_table
/* Get the Sparc64 ELF linker hash table from a link_info structure. */
#define m68hc11_elf_hash_table(p) \
(elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
== M68HC11_ELF_DATA ? ((struct m68hc11_elf_link_hash_table *) ((p)->hash)) : NULL)
((is_elf_hash_table ((p)->hash) \
&& elf_hash_table_id (elf_hash_table (p)) == M68HC11_ELF_DATA) \
? (struct m68hc11_elf_link_hash_table *) (p)->hash : NULL)
/* Create a 68HC11/68HC12 ELF linker hash table. */

View File

@ -910,8 +910,9 @@ struct elf_m68k_link_hash_table
/* Get the m68k ELF linker hash table from a link_info structure. */
#define elf_m68k_hash_table(p) \
(elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
== M68K_ELF_DATA ? ((struct elf_m68k_link_hash_table *) ((p)->hash)) : NULL)
((is_elf_hash_table ((p)->hash) \
&& elf_hash_table_id (elf_hash_table (p)) == M68K_ELF_DATA) \
? (struct elf_m68k_link_hash_table *) (p)->hash : NULL)
/* Shortcut to multi-GOT data. */
#define elf_m68k_multi_got(INFO) (&elf_m68k_hash_table (INFO)->multi_got_)

View File

@ -906,8 +906,9 @@ metag_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
/* Various hash macros and functions. */
#define metag_link_hash_table(p) \
(elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
== METAG_ELF_DATA ? ((struct elf_metag_link_hash_table *) ((p)->hash)) : NULL)
((is_elf_hash_table ((p)->hash) \
&& elf_hash_table_id (elf_hash_table (p)) == METAG_ELF_DATA) \
? (struct elf_metag_link_hash_table *) (p)->hash : NULL)
#define metag_elf_hash_entry(ent) \
((struct elf_metag_link_hash_entry *)(ent))

View File

@ -756,9 +756,10 @@ struct elf32_mb_link_hash_table
/* Get the ELF linker hash table from a link_info structure. */
#define elf32_mb_hash_table(p) \
(elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
== MICROBLAZE_ELF_DATA ? ((struct elf32_mb_link_hash_table *) ((p)->hash)) : NULL)
#define elf32_mb_hash_table(p) \
((is_elf_hash_table ((p)->hash) \
&& elf_hash_table_id (elf_hash_table (p)) == MICROBLAZE_ELF_DATA) \
? (struct elf32_mb_link_hash_table *) (p)->hash : NULL)
/* Create an entry in a microblaze ELF linker hash table. */

View File

@ -104,10 +104,10 @@ extern void bfd_elf32_nds32_set_target_option (struct bfd_link_info *,
int, int, FILE *,
int, int, int);
#define nds32_elf_hash_table(info) \
(elf_hash_table_id ((struct elf_link_hash_table *) ((info)->hash)) \
== NDS32_ELF_DATA ? \
((struct elf_nds32_link_hash_table *) ((info)->hash)) : NULL)
#define nds32_elf_hash_table(p) \
((is_elf_hash_table ((p)->hash) \
&& elf_hash_table_id (elf_hash_table (p)) == NDS32_ELF_DATA) \
? (struct elf_nds32_link_hash_table *) (p)->hash : NULL)
#define elf32_nds32_compute_jump_table_size(htab) \
((htab)->next_tls_desc_index * 4)

View File

@ -921,8 +921,9 @@ struct elf_or1k_link_hash_table
/* Get the ELF linker hash table from a link_info structure. */
#define or1k_elf_hash_table(p) \
(elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
== OR1K_ELF_DATA ? ((struct elf_or1k_link_hash_table *) ((p)->hash)) : NULL)
((is_elf_hash_table ((p)->hash) \
&& elf_hash_table_id (elf_hash_table (p)) == OR1K_ELF_DATA) \
? (struct elf_or1k_link_hash_table *) (p)->hash : NULL)
static bfd_boolean
elf_or1k_mkobject (bfd *abfd)

View File

@ -751,8 +751,9 @@ struct elf_s390_link_hash_table
/* Get the s390 ELF linker hash table from a link_info structure. */
#define elf_s390_hash_table(p) \
(elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
== S390_ELF_DATA ? ((struct elf_s390_link_hash_table *) ((p)->hash)) : NULL)
((is_elf_hash_table ((p)->hash) \
&& elf_hash_table_id (elf_hash_table (p)) == S390_ELF_DATA) \
? (struct elf_s390_link_hash_table *) (p)->hash : NULL)
#undef ELF64
#include "elf-s390-common.c"

View File

@ -2192,8 +2192,9 @@ struct elf_sh_link_hash_table
/* Get the sh ELF linker hash table from a link_info structure. */
#define sh_elf_hash_table(p) \
(elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
== SH_ELF_DATA ? ((struct elf_sh_link_hash_table *) ((p)->hash)) : NULL)
((is_elf_hash_table ((p)->hash) \
&& elf_hash_table_id (elf_hash_table (p)) == SH_ELF_DATA) \
? (struct elf_sh_link_hash_table *) (p)->hash : NULL)
/* Create an entry in an sh ELF linker hash table. */

View File

@ -371,8 +371,9 @@ struct got_entry
};
#define spu_hash_table(p) \
(elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
== SPU_ELF_DATA ? ((struct spu_link_hash_table *) ((p)->hash)) : NULL)
((is_elf_hash_table ((p)->hash) \
&& elf_hash_table_id (elf_hash_table (p)) == SPU_ELF_DATA) \
? (struct spu_link_hash_table *) (p)->hash : NULL)
struct call_info
{

View File

@ -729,9 +729,9 @@ tilepro_elf_mkobject (bfd *abfd)
/* Get the Tilepro ELF linker hash table from a link_info structure. */
#define tilepro_elf_hash_table(p) \
(elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
== TILEPRO_ELF_DATA \
? ((struct elf_link_hash_table *) ((p)->hash)) : NULL)
((is_elf_hash_table ((p)->hash) \
&& elf_hash_table_id (elf_hash_table (p)) == TILEPRO_ELF_DATA) \
? (struct elf_link_hash_table *) (p)->hash : NULL)
static reloc_howto_type *
tilepro_reloc_type_lookup (bfd * abfd ATTRIBUTE_UNUSED,

View File

@ -705,8 +705,9 @@ struct elf_xtensa_link_hash_table
/* Get the Xtensa ELF linker hash table from a link_info structure. */
#define elf_xtensa_hash_table(p) \
(elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
== XTENSA_ELF_DATA ? ((struct elf_xtensa_link_hash_table *) ((p)->hash)) : NULL)
((is_elf_hash_table ((p)->hash) \
&& elf_hash_table_id (elf_hash_table (p)) == XTENSA_ELF_DATA) \
? (struct elf_xtensa_link_hash_table *) (p)->hash : NULL)
/* Create an entry in an Xtensa ELF linker hash table. */

View File

@ -216,8 +216,9 @@ struct alpha_elf_link_hash_table
/* Get the Alpha ELF linker hash table from a link_info structure. */
#define alpha_elf_hash_table(p) \
(elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
== ALPHA_ELF_DATA ? ((struct alpha_elf_link_hash_table *) ((p)->hash)) : NULL)
((is_elf_hash_table ((p)->hash) \
&& elf_hash_table_id (elf_hash_table (p)) == ALPHA_ELF_DATA) \
? (struct alpha_elf_link_hash_table *) (p)->hash : NULL)
/* Get the object's symbols as our own entry type. */

View File

@ -145,8 +145,9 @@ struct elf64_hppa_link_hash_table
};
#define hppa_link_hash_table(p) \
(elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
== HPPA64_ELF_DATA ? ((struct elf64_hppa_link_hash_table *) ((p)->hash)) : NULL)
((is_elf_hash_table ((p)->hash) \
&& elf_hash_table_id (elf_hash_table (p)) == HPPA64_ELF_DATA) \
? (struct elf64_hppa_link_hash_table *) (p)->hash : NULL)
#define hppa_elf_hash_entry(ent) \
((struct elf64_hppa_link_hash_entry *)(ent))

View File

@ -170,8 +170,9 @@ struct elf64_ia64_allocate_data
};
#define elf64_ia64_hash_table(p) \
(elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
== IA64_ELF_DATA ? ((struct elf64_ia64_link_hash_table *) ((p)->hash)) : NULL)
((is_elf_hash_table ((p)->hash) \
&& elf_hash_table_id (elf_hash_table (p)) == IA64_ELF_DATA) \
? (struct elf64_ia64_link_hash_table *) (p)->hash : NULL)
struct elf64_ia64_vms_obj_tdata
{

View File

@ -670,8 +670,9 @@ struct elf_s390_link_hash_table
/* Get the s390 ELF linker hash table from a link_info structure. */
#define elf_s390_hash_table(p) \
(elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
== S390_ELF_DATA ? ((struct elf_s390_link_hash_table *) ((p)->hash)) : NULL)
((is_elf_hash_table ((p)->hash) \
&& elf_hash_table_id (elf_hash_table (p)) == S390_ELF_DATA) \
? (struct elf_s390_link_hash_table *) (p)->hash : NULL)
#define ELF64 1
#include "elf-s390-common.c"

View File

@ -166,8 +166,9 @@ struct elfNN_ia64_allocate_data
};
#define elfNN_ia64_hash_table(p) \
(elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
== IA64_ELF_DATA ? ((struct elfNN_ia64_link_hash_table *) ((p)->hash)) : NULL)
((is_elf_hash_table ((p)->hash) \
&& elf_hash_table_id (elf_hash_table (p)) == IA64_ELF_DATA) \
? (struct elfNN_ia64_link_hash_table *) (p)->hash : NULL)
static struct elfNN_ia64_dyn_sym_info * get_dyn_sym_info
(struct elfNN_ia64_link_hash_table *ia64_info,

View File

@ -120,8 +120,9 @@ struct riscv_elf_link_hash_table
/* Get the RISC-V ELF linker hash table from a link_info structure. */
#define riscv_elf_hash_table(p) \
(elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
== RISCV_ELF_DATA ? ((struct riscv_elf_link_hash_table *) ((p)->hash)) : NULL)
((is_elf_hash_table ((p)->hash) \
&& elf_hash_table_id (elf_hash_table (p)) == RISCV_ELF_DATA) \
? (struct riscv_elf_link_hash_table *) (p)->hash : NULL)
static bfd_boolean
riscv_info_to_howto_rela (bfd *abfd,

View File

@ -534,8 +534,9 @@ struct mips_elf_link_hash_table
/* Get the MIPS ELF linker hash table from a link_info structure. */
#define mips_elf_hash_table(p) \
(elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
== MIPS_ELF_DATA ? ((struct mips_elf_link_hash_table *) ((p)->hash)) : NULL)
((is_elf_hash_table ((p)->hash) \
&& elf_hash_table_id (elf_hash_table (p)) == MIPS_ELF_DATA) \
? (struct mips_elf_link_hash_table *) (p)->hash : NULL)
/* A structure used to communicate with htab_traverse callbacks. */
struct mips_htab_traverse_info

View File

@ -84,8 +84,9 @@ struct _bfd_sparc_elf_link_hash_table
/* Get the SPARC ELF linker hash table from a link_info structure. */
#define _bfd_sparc_elf_hash_table(p) \
(elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
== SPARC_ELF_DATA ? ((struct _bfd_sparc_elf_link_hash_table *) ((p)->hash)) : NULL)
((is_elf_hash_table ((p)->hash) \
&& elf_hash_table_id (elf_hash_table (p)) == SPARC_ELF_DATA) \
? (struct _bfd_sparc_elf_link_hash_table *) (p)->hash : NULL)
extern reloc_howto_type *_bfd_sparc_elf_reloc_type_lookup
(bfd *, bfd_reloc_code_real_type);

View File

@ -840,8 +840,9 @@ struct tilegx_elf_link_hash_table
/* Get the Tile ELF linker hash table from a link_info structure. */
#define tilegx_elf_hash_table(p) \
(elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
== TILEGX_ELF_DATA ? ((struct tilegx_elf_link_hash_table *) ((p)->hash)) : NULL)
((is_elf_hash_table ((p)->hash) \
&& elf_hash_table_id (elf_hash_table (p)) == TILEGX_ELF_DATA) \
? (struct tilegx_elf_link_hash_table *) (p)->hash : NULL)
#ifdef BFD64
static bfd_vma