bfd_hash_lookup ((table), (string), (create), (copy)))
-/* The Nios II linker needs to keep track of the number of relocs that it
- decides to copy as dynamic relocs in check_relocs for each symbol.
- This is so that it can later discard them if they are found to be
- unnecessary. We store the information in a field extending the
- regular ELF linker hash table. */
-
-struct elf32_nios2_dyn_relocs
-{
- struct elf32_nios2_dyn_relocs *next;
-
- /* The input section of the reloc. */
- asection *sec;
-
- /* Total number of relocs copied for the input section. */
- bfd_size_type count;
-
- /* Number of pc-relative relocs copied for the input section. */
- bfd_size_type pc_count;
-};
-
/* Nios II ELF linker hash entry. */
struct elf32_nios2_link_hash_entry
struct elf32_nios2_stub_hash_entry *hsh_cache;
/* Track dynamic relocs copied for this symbol. */
- struct elf32_nios2_dyn_relocs *dyn_relocs;
+ struct elf_dyn_relocs *dyn_relocs;
#define GOT_UNKNOWN 0
#define GOT_NORMAL 1
{
if (edir->dyn_relocs != NULL)
{
- struct elf32_nios2_dyn_relocs **pp;
- struct elf32_nios2_dyn_relocs *p;
+ struct elf_dyn_relocs **pp;
+ struct elf_dyn_relocs *p;
/* Add reloc counts against the indirect sym to the direct sym
list. Merge any entries against the same section. */
for (pp = &eind->dyn_relocs; (p = *pp) != NULL; )
{
- struct elf32_nios2_dyn_relocs *q;
+ struct elf_dyn_relocs *q;
for (q = edir->dyn_relocs; q != NULL; q = q->next)
if (q->sec == p->sec)
|| (h != NULL && ! h->needs_plt
&& (! SYMBOLIC_BIND (info, h) || ! h->def_regular))))
{
- struct elf32_nios2_dyn_relocs *p;
- struct elf32_nios2_dyn_relocs **head;
+ struct elf_dyn_relocs *p;
+ struct elf_dyn_relocs **head;
/* When creating a shared object, we must copy these
reloc types into the output file. We create a reloc
s = sec;
vpp = &elf_section_data (s)->local_dynrel;
- head = (struct elf32_nios2_dyn_relocs **) vpp;
+ head = (struct elf_dyn_relocs **) vpp;
}
p = *head;
if (p == NULL || p->sec != sec)
{
bfd_size_type amt = sizeof *p;
- p = ((struct elf32_nios2_dyn_relocs *)
+ p = ((struct elf_dyn_relocs *)
bfd_alloc (htab->root.dynobj, amt));
if (p == NULL)
return FALSE;
struct bfd_link_info *info;
struct elf32_nios2_link_hash_table *htab;
struct elf32_nios2_link_hash_entry *eh;
- struct elf32_nios2_dyn_relocs *p;
+ struct elf_dyn_relocs *p;
int use_plt;
if (h->root.type == bfd_link_hash_indirect)
if (h->def_regular
&& (h->forced_local || SYMBOLIC_BIND (info, h)))
{
- struct elf32_nios2_dyn_relocs **pp;
+ struct elf_dyn_relocs **pp;
for (pp = &eh->dyn_relocs; (p = *pp) != NULL; )
{
for (s = ibfd->sections; s != NULL; s = s->next)
{
- struct elf32_nios2_dyn_relocs *p;
+ struct elf_dyn_relocs *p;
for (p = elf_section_data (s)->local_dynrel; p != NULL; p = p->next)
{