while (h->root.type == bfd_link_hash_indirect
|| h->root.type == bfd_link_hash_warning)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
- /* PR15323, ref flags aren't set for references in the same
- object. */
- h->root.non_ir_ref = 1;
}
switch (ELF32_R_TYPE (rel->r_info))
if (eh->got_addend != (bfd_vma) rel->r_addend)
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: warning: GOT addend of %ld to `%s' does"
- " not match previous GOT addend of %ld"),
+ (_("%B: warning: GOT addend of %Ld to `%s' does"
+ " not match previous GOT addend of %Ld"),
abfd, rel->r_addend, h->root.root.string,
eh->got_addend);
return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
}
-/* Update the got entry reference counts for the section being removed. */
-
-static bfd_boolean
-elf_vax_gc_sweep_hook (bfd *abfd, struct bfd_link_info *info, asection *sec,
- const Elf_Internal_Rela *relocs)
-{
- Elf_Internal_Shdr *symtab_hdr;
- struct elf_link_hash_entry **sym_hashes;
- const Elf_Internal_Rela *rel, *relend;
- bfd *dynobj;
-
- if (bfd_link_relocatable (info))
- return TRUE;
-
- dynobj = elf_hash_table (info)->dynobj;
- if (dynobj == NULL)
- return TRUE;
-
- symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
- sym_hashes = elf_sym_hashes (abfd);
-
- relend = relocs + sec->reloc_count;
- for (rel = relocs; rel < relend; rel++)
- {
- unsigned long r_symndx;
- struct elf_link_hash_entry *h = NULL;
-
- r_symndx = ELF32_R_SYM (rel->r_info);
- if (r_symndx >= symtab_hdr->sh_info)
- {
- h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- while (h->root.type == bfd_link_hash_indirect
- || h->root.type == bfd_link_hash_warning)
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
- }
-
- switch (ELF32_R_TYPE (rel->r_info))
- {
- case R_VAX_GOT32:
- if (h != NULL && h->got.refcount > 0)
- --h->got.refcount;
- break;
-
- case R_VAX_PLT32:
- case R_VAX_PC8:
- case R_VAX_PC16:
- case R_VAX_PC32:
- case R_VAX_8:
- case R_VAX_16:
- case R_VAX_32:
- if (h != NULL && h->plt.refcount > 0)
- --h->plt.refcount;
- break;
-
- default:
- break;
- }
- }
-
- return TRUE;
-}
-
/* Adjust a symbol defined by a dynamic object and referenced by a
regular object. The current definition is in some section of the
dynamic object, but we're not including those sections. We have to
/* Make sure we know what is going on here. */
BFD_ASSERT (dynobj != NULL
&& (h->needs_plt
- || h->u.weakdef != NULL
+ || h->is_weakalias
|| (h->def_dynamic
&& h->ref_regular
&& !h->def_regular)));
/* If this is a weak symbol, and there is a real definition, the
processor independent code will have arranged for us to see the
real definition first, and we can just use the same value. */
- if (h->u.weakdef != NULL)
+ if (h->is_weakalias)
{
- BFD_ASSERT (h->u.weakdef->root.type == bfd_link_hash_defined
- || h->u.weakdef->root.type == bfd_link_hash_defweak);
- h->root.u.def.section = h->u.weakdef->root.u.def.section;
- h->root.u.def.value = h->u.weakdef->root.u.def.value;
+ struct elf_link_hash_entry *def = weakdef (h);
+ BFD_ASSERT (def->root.type == bfd_link_hash_defined);
+ h->root.u.def.section = def->root.u.def.section;
+ h->root.u.def.value = def->root.u.def.value;
return TRUE;
}
else if (rel->r_addend != 0)
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: warning: PLT addend of %d to `%s'"
+ (_("%B: warning: PLT addend of %Ld to `%s'"
" from %A section ignored"),
input_bfd, rel->r_addend, h->root.root.string, input_section);
rel->r_addend = 0;
else
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: warning: %s relocation to 0x%x from %A section"),
+ (_("%B: warning: %s relocation to %#Lx from %A section"),
input_bfd, howto->name, outrel.r_addend,
input_section);
}
elf_vax_finish_dynamic_sections
#define elf_backend_reloc_type_class elf_vax_reloc_type_class
#define elf_backend_gc_mark_hook elf_vax_gc_mark_hook
-#define elf_backend_gc_sweep_hook elf_vax_gc_sweep_hook
#define elf_backend_plt_sym_val elf_vax_plt_sym_val
#define bfd_elf32_bfd_merge_private_bfd_data \
elf32_vax_merge_private_bfd_data