/* Support for HPPA 64-bit ELF
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
- 2010 Free Software Foundation, Inc.
+ 2010, 2011 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
i_ehdrp = elf_elfheader (abfd);
if (strcmp (bfd_get_target (abfd), "elf64-hppa-linux") == 0)
{
- /* GCC on hppa-linux produces binaries with OSABI=Linux,
+ /* GCC on hppa-linux produces binaries with OSABI=GNU,
but the kernel produces corefiles with OSABI=SysV. */
- if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_LINUX
+ if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_GNU
&& i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_NONE) /* aka SYSV */
return FALSE;
}
if (srel_name == NULL)
return FALSE;
- BFD_ASSERT ((CONST_STRNEQ (srel_name, ".rela")
- && strcmp (bfd_get_section_name (abfd, sec),
- srel_name + 5) == 0)
- || (CONST_STRNEQ (srel_name, ".rel")
- && strcmp (bfd_get_section_name (abfd, sec),
- srel_name + 4) == 0));
-
dynobj = hppa_info->root.dynobj;
if (!dynobj)
hppa_info->root.dynobj = dynobj = abfd;
if (hppa_info == NULL)
return FALSE;
- if (eh->root.type == bfd_link_hash_warning)
- eh = (struct elf_link_hash_entry *) eh->root.u.i.link;
-
if (eh
&& (eh->root.type == bfd_link_hash_defined
|| eh->root.type == bfd_link_hash_defweak)
if (hh && hh->want_opd)
{
- while (hh->eh.root.type == bfd_link_hash_indirect
- || hh->eh.root.type == bfd_link_hash_warning)
- hh = hppa_elf_hash_entry (hh->eh.root.u.i.link);
-
/* We never need an opd entry for a symbol which is not
defined by this output file. */
if (hh && (hh->eh.root.type == bfd_link_hash_undefined
elf64_hppa_mark_milli_and_exported_functions (struct elf_link_hash_entry *eh,
void *data)
{
- struct elf_link_hash_entry *elf = eh;
- struct bfd_link_info *info = (struct bfd_link_info *)data;
+ struct bfd_link_info *info = (struct bfd_link_info *) data;
- if (elf->root.type == bfd_link_hash_warning)
- elf = (struct elf_link_hash_entry *) elf->root.u.i.link;
-
- if (elf->type == STT_PARISC_MILLI)
+ if (eh->type == STT_PARISC_MILLI)
{
- if (elf->dynindx != -1)
+ if (eh->dynindx != -1)
{
- elf->dynindx = -1;
+ eh->dynindx = -1;
_bfd_elf_strtab_delref (elf_hash_table (info)->dynstr,
- elf->dynstr_index);
+ eh->dynstr_index);
}
return TRUE;
}
{
struct bfd_link_info *info = data;
- if (h->root.type == bfd_link_hash_warning)
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
/* If we are not creating a shared library, and this symbol is
referenced by a shared library but is not defined anywhere, then
the generic code will warn that it is undefined.
{
struct bfd_link_info *info = data;
- if (h->root.type == bfd_link_hash_warning)
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
/* If we are not creating a shared library, and this symbol is
referenced by a shared library but is not defined anywhere, then
the generic code will warn that it is undefined.
&& value + addend + max_branch_offset >= 2*max_branch_offset)
{
(*_bfd_error_handler)
- (_("%B(%A+0x%lx): cannot reach %s"),
+ (_("%B(%A+0x" BFD_VMA_FMT "x): cannot reach %s"),
input_bfd,
input_section,
offset,
- eh->root.root.string);
+ eh ? eh->root.root.string : "unknown");
bfd_set_error (bfd_error_bad_value);
- return bfd_reloc_notsupported;
+ return bfd_reloc_overflow;
}
/* Adjust for any field selectors. */
#undef TARGET_BIG_NAME
#define TARGET_BIG_NAME "elf64-hppa-linux"
#undef ELF_OSABI
-#define ELF_OSABI ELFOSABI_LINUX
+#define ELF_OSABI ELFOSABI_GNU
#undef elf_backend_post_process_headers
#define elf_backend_post_process_headers _bfd_elf_set_osabi
#undef elf64_bed