/* Support for HPPA 64-bit ELF
- Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
- 2009, 2010, 2011, 2012
- Free Software Foundation, Inc.
+ Copyright (C) 1999-2015 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
(bfd *, struct bfd_link_info *,
struct elf_link_hash_entry *, Elf_Internal_Sym *);
-static enum elf_reloc_type_class elf64_hppa_reloc_type_class
- (const Elf_Internal_Rela *);
-
static bfd_boolean elf64_hppa_finish_dynamic_sections
(bfd *, struct bfd_link_info *);
|| hh->eh.root.type == bfd_link_hash_warning)
hh = hppa_elf_hash_entry (hh->eh.root.u.i.link);
+ /* PR15323, ref flags aren't set for references in the same
+ object. */
+ hh->eh.root.non_ir_ref = 1;
hh->eh.ref_regular = 1;
}
else
/* Set up DLT, PLT and OPD offsets for local syms, and space for local
dynamic relocs. */
- for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+ for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next)
{
bfd_signed_vma *local_dlt;
bfd_signed_vma *end_local_dlt;
dynamic linker, before writing them out. */
static enum elf_reloc_type_class
-elf64_hppa_reloc_type_class (const Elf_Internal_Rela *rela)
+elf64_hppa_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ const asection *rel_sec ATTRIBUTE_UNUSED,
+ const Elf_Internal_Rela *rela)
{
if (ELF64_R_SYM (rela->r_info) == STN_UNDEF)
return reloc_class_relative;
area at the start of the .data section. So all we have to
to is find the start of the .data section. */
s = bfd_get_section_by_name (output_bfd, ".data");
+ if (!s)
+ return FALSE;
dyn.d_un.d_ptr = s->vma;
bfd_elf64_swap_dyn_out (output_bfd, &dyn, dyncon);
break;
case 760: /* Linux/hppa */
/* pr_cursig */
- elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
+ elf_tdata (abfd)->core->signal = bfd_get_16 (abfd, note->descdata + 12);
/* pr_pid */
- elf_tdata (abfd)->core_lwpid = bfd_get_32 (abfd, note->descdata + 32);
+ elf_tdata (abfd)->core->lwpid = bfd_get_32 (abfd, note->descdata + 32);
/* pr_reg */
offset = 112;
return FALSE;
case 136: /* Linux/hppa elf_prpsinfo. */
- elf_tdata (abfd)->core_program
+ elf_tdata (abfd)->core->program
= _bfd_elfcore_strndup (abfd, note->descdata + 40, 16);
- elf_tdata (abfd)->core_command
+ elf_tdata (abfd)->core->command
= _bfd_elfcore_strndup (abfd, note->descdata + 56, 80);
}
/* Note that for some reason, a spurious space is tacked
onto the end of the args in some (at least one anyway)
implementations, so strip it off if it exists. */
- command = elf_tdata (abfd)->core_command;
+ command = elf_tdata (abfd)->core->command;
n = strlen (command);
if (0 < n && command[n - 1] == ' ')
s = bfd_get_section_by_name (abfd, ".interp");
if (! s)
{
- for (m = elf_tdata (abfd)->segment_map; m != NULL; m = m->next)
+ for (m = elf_seg_map (abfd); m != NULL; m = m->next)
if (m->p_type == PT_PHDR)
break;
if (m == NULL)
m->p_paddr_valid = 1;
m->includes_phdrs = 1;
- m->next = elf_tdata (abfd)->segment_map;
- elf_tdata (abfd)->segment_map = m;
+ m->next = elf_seg_map (abfd);
+ elf_seg_map (abfd) = m;
}
}
- for (m = elf_tdata (abfd)->segment_map; m != NULL; m = m->next)
+ for (m = elf_seg_map (abfd); m != NULL; m = m->next)
if (m->p_type == PT_LOAD)
{
unsigned int i;
if (bfd_bread (&sig, 4, abfd) != 4)
return FALSE;
- elf_tdata (abfd)->core_signal = sig;
+ elf_tdata (abfd)->core->signal = sig;
if (!_bfd_elf_make_section_from_phdr (abfd, hdr, sec_index, typename))
return FALSE;
&& value + addend + max_branch_offset >= 2*max_branch_offset)
{
(*_bfd_error_handler)
- (_("%B(%A+0x" BFD_VMA_FMT "x): cannot reach %s"),
+ (_("%B(%A+0x%" BFD_VMA_FMT "x): cannot reach %s"),
input_bfd,
input_section,
offset,
eh = sym_hashes[r_symndx - symtab_hdr->sh_info];
+ if (info->wrap_hash != NULL
+ && (input_section->flags & SEC_DEBUGGING) != 0)
+ eh = ((struct elf_link_hash_entry *)
+ unwrap_hash_lookup (info, input_bfd, &eh->root));
+
while (eh->root.type == bfd_link_hash_indirect
|| eh->root.type == bfd_link_hash_warning)
eh = (struct elf_link_hash_entry *) eh->root.u.i.link;
bfd_elf64_swap_reloca_out
};
-#define TARGET_BIG_SYM bfd_elf64_hppa_vec
+#define TARGET_BIG_SYM hppa_elf64_vec
#define TARGET_BIG_NAME "elf64-hppa"
#define ELF_ARCH bfd_arch_hppa
#define ELF_TARGET_ID HPPA64_ELF_DATA
#include "elf64-target.h"
#undef TARGET_BIG_SYM
-#define TARGET_BIG_SYM bfd_elf64_hppa_linux_vec
+#define TARGET_BIG_SYM hppa_elf64_linux_vec
#undef TARGET_BIG_NAME
#define TARGET_BIG_NAME "elf64-hppa-linux"
#undef ELF_OSABI
#define ELF_OSABI ELFOSABI_GNU
-#undef elf_backend_post_process_headers
-#define elf_backend_post_process_headers _bfd_elf_set_osabi
#undef elf64_bed
#define elf64_bed elf64_hppa_linux_bed