/* 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)
struct bfin_pcrel_relocs_copied *pcrel_relocs_copied;
};
-/* bfin ELF linker hash table. */
-
-struct bfin_link_hash_table
-{
- struct elf_link_hash_table root;
-
- /* Small local sym cache. */
- struct sym_cache sym_cache;
-};
-
#define bfin_hash_entry(ent) ((struct bfin_link_hash_entry *) (ent))
static struct bfd_hash_entry *
static struct bfd_link_hash_table *
bfin_link_hash_table_create (bfd * abfd)
{
- struct bfin_link_hash_table *ret;
- size_t amt = sizeof (struct bfin_link_hash_table);
+ struct elf_link_hash_table *ret;
+ size_t amt = sizeof (struct elf_link_hash_table);
ret = bfd_zmalloc (amt);
if (ret == NULL)
return NULL;
- if (!_bfd_elf_link_hash_table_init (&ret->root, abfd,
- bfin_link_hash_newfunc,
+ if (!_bfd_elf_link_hash_table_init (ret, abfd, bfin_link_hash_newfunc,
sizeof (struct elf_link_hash_entry),
BFIN_ELF_DATA))
{
return NULL;
}
- ret->sym_cache.abfd = NULL;
-
- return &ret->root.root;
+ return &ret->root;
}
/* The size in bytes of an entry in the procedure linkage table. */
#define bfd_elf32_bfd_is_local_label_name \
bfin_is_local_label_name
-#define bfin_hash_table(p) \
- ((struct bfin_link_hash_table *) (p)->hash)
-
-
#define elf_backend_create_dynamic_sections \
_bfd_elf_create_dynamic_sections