/* 32-bit ELF support for Nios II.
- Copyright (C) 2012-2014 Free Software Foundation, Inc.
+ Copyright (C) 2012-2015 Free Software Foundation, Inc.
Contributed by Nigel Gray (ngray@altera.com).
Contributed by Mentor Graphics, Inc.
/* No relocation. */
HOWTO (R_NIOS2_NONE, /* type */
0, /* rightshift */
- 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 3, /* size (0 = byte, 1 = short, 2 = long) */
0, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
};
static const struct elf_reloc_map nios2_reloc_map[] = {
+ {BFD_RELOC_NONE, R_NIOS2_NONE},
{BFD_RELOC_NIOS2_S16, R_NIOS2_S16},
{BFD_RELOC_NIOS2_U16, R_NIOS2_U16},
{BFD_RELOC_16_PCREL, R_NIOS2_PCREL16},
/* Free the derived linker hash table. */
static void
-nios2_elf32_link_hash_table_free (struct bfd_link_hash_table *btab)
+nios2_elf32_link_hash_table_free (bfd *obfd)
{
struct elf32_nios2_link_hash_table *htab
- = (struct elf32_nios2_link_hash_table *) btab;
+ = (struct elf32_nios2_link_hash_table *) obfd->link.hash;
bfd_hash_table_free (&htab->bstab);
- _bfd_elf_link_hash_table_free (btab);
+ _bfd_elf_link_hash_table_free (obfd);
}
/* Implement bfd_elf32_bfd_link_hash_table_create. */
/* Init the stub hash table too. */
if (!bfd_hash_table_init (&ret->bstab, stub_hash_newfunc,
sizeof (struct elf32_nios2_stub_hash_entry)))
- return NULL;
- (void) nios2_elf32_link_hash_table_free;
+ {
+ _bfd_elf_link_hash_table_free (abfd);
+ return NULL;
+ }
+ ret->root.root.hash_table_free = nios2_elf32_link_hash_table_free;
return &ret->root.root;
}
#define TARGET_BIG_NAME "elf32-bignios2"
#define elf_backend_got_header_size 12
+#define elf_backend_default_execstack 0
#include "elf32-target.h"