const char *name,
int shindex)
{
- asection *newsect;
-
switch (hdr->sh_type)
{
case SHT_PARISC_EXT:
if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex))
return FALSE;
- newsect = hdr->bfd_section;
return TRUE;
}
srel_name = (bfd_elf_string_from_elf_section
(abfd, elf_elfheader(abfd)->e_shstrndx,
- elf_section_data(sec)->rel_hdr.sh_name));
+ _bfd_elf_single_rel_hdr(sec)->sh_name));
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;
const Elf_Internal_Rela *relend;
Elf_Internal_Shdr *symtab_hdr;
const Elf_Internal_Rela *rel;
- asection *dlt, *plt, *stubs;
- char *buf;
- size_t buf_len;
unsigned int sec_symndx;
if (info->relocatable)
else
sec_symndx = 0;
- dlt = plt = stubs = NULL;
- buf = NULL;
- buf_len = 0;
-
relend = relocs + sec->reloc_count;
for (rel = relocs; rel < relend; ++rel)
{
}
}
- if (buf)
- free (buf);
return TRUE;
err_out:
- if (buf)
- free (buf);
return FALSE;
}
Elf_Internal_Sym *sym)
{
struct elf64_hppa_link_hash_entry *hh = hppa_elf_hash_entry (eh);
- asection *stub, *splt, *sdlt, *sopd, *spltrel, *sdltrel;
+ asection *stub, *splt, *sopd, *spltrel;
struct elf64_hppa_link_hash_table *hppa_info;
hppa_info = hppa_link_hash_table (info);
stub = hppa_info->stub_sec;
splt = hppa_info->plt_sec;
- sdlt = hppa_info->dlt_sec;
sopd = hppa_info->opd_sec;
spltrel = hppa_info->plt_rel_sec;
- sdltrel = hppa_info->dlt_rel_sec;
/* Incredible. It is actually necessary to NOT use the symbol's real
value when building the dynamic symbol table for a shared library.
static enum elf_reloc_type_class
elf64_hppa_reloc_type_class (const Elf_Internal_Rela *rela)
{
- if (ELF64_R_SYM (rela->r_info) == 0)
+ if (ELF64_R_SYM (rela->r_info) == STN_UNDEF)
return reloc_class_relative;
switch ((int) ELF64_R_TYPE (rela->r_info))
elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
/* pr_pid */
- elf_tdata (abfd)->core_pid = bfd_get_32 (abfd, note->descdata + 32);
+ elf_tdata (abfd)->core_lwpid = bfd_get_32 (abfd, note->descdata + 32);
/* pr_reg */
offset = 112;
asection *sym_sec;
bfd_vma relocation;
bfd_reloc_status_type r;
- bfd_boolean warned_undef;
r_type = ELF_R_TYPE (rel->r_info);
if (r_type < 0 || r_type >= (int) R_PARISC_UNIMPLEMENTED)
eh = NULL;
sym = NULL;
sym_sec = NULL;
- warned_undef = FALSE;
if (r_symndx < symtab_hdr->sh_info)
{
/* This is a local symbol, hh defaults to NULL. */
else
{
/* This is not a local symbol. */
- bfd_boolean unresolved_reloc;
struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (input_bfd);
/* It seems this can happen with erroneous or unsupported
|| eh->root.type == bfd_link_hash_warning)
eh = (struct elf_link_hash_entry *) eh->root.u.i.link;
- warned_undef = FALSE;
- unresolved_reloc = FALSE;
relocation = 0;
if (eh->root.type == bfd_link_hash_defined
|| eh->root.type == bfd_link_hash_defweak)
{
sym_sec = eh->root.u.def.section;
- if (sym_sec == NULL
- || sym_sec->output_section == NULL)
- /* Set a flag that will be cleared later if we find a
- relocation value for this symbol. output_section
- is typically NULL for symbols satisfied by a shared
- library. */
- unresolved_reloc = TRUE;
- else
+ if (sym_sec != NULL
+ && sym_sec->output_section != NULL)
relocation = (eh->root.u.def.value
+ sym_sec->output_section->vma
+ sym_sec->output_offset);
input_section,
rel->r_offset, err))
return FALSE;
- warned_undef = TRUE;
}
if (!info->relocatable
(info, eh_name (eh), input_bfd,
input_section, rel->r_offset, FALSE))
return FALSE;
- warned_undef = TRUE;
}
}
}
if (sym_sec != NULL && elf_discarded_section (sym_sec))
- {
- /* For relocs against symbols from removed linkonce sections,
- or sections discarded by a linker script, we just want the
- section contents zeroed. Avoid any special processing. */
- _bfd_clear_contents (howto, input_bfd, contents + rel->r_offset);
- rel->r_info = 0;
- rel->r_addend = 0;
- continue;
- }
+ RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
+ rel, relend, howto, contents);
if (info->relocatable)
continue;
#define TARGET_BIG_SYM bfd_elf64_hppa_vec
#define TARGET_BIG_NAME "elf64-hppa"
#define ELF_ARCH bfd_arch_hppa
+#define ELF_TARGET_ID HPPA64_ELF_DATA
#define ELF_MACHINE_CODE EM_PARISC
/* This is not strictly correct. The maximum page size for PA2.0 is
64M. But everything still uses 4k. */