/* IA-64 support for 64-bit ELF
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+ Copyright 1998-2013 Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of BFD, the Binary File Descriptor library.
s = bfd_get_section_by_name (abfd, ELF_STRING_ia64_archext);
if (s && (s->flags & SEC_LOAD))
{
- 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_IA_64_ARCHEXT)
break;
if (m == NULL)
m->sections[0] = s;
/* We want to put it after the PHDR and INTERP segments. */
- pm = &elf_tdata (abfd)->segment_map;
+ pm = &elf_seg_map (abfd);
while (*pm != NULL
&& ((*pm)->p_type == PT_PHDR
|| (*pm)->p_type == PT_INTERP))
if (s && (s->flags & SEC_LOAD))
{
- 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_IA_64_UNWIND)
{
int i;
m->next = NULL;
/* We want to put it last. */
- pm = &elf_tdata (abfd)->segment_map;
+ pm = &elf_seg_map (abfd);
while (*pm != NULL)
pm = &(*pm)->next;
*pm = m;
struct elf_segment_map *m;
Elf_Internal_Phdr *p;
- for (p = tdata->phdr, m = tdata->segment_map; m != NULL; m = m->next, p++)
+ for (p = tdata->phdr, m = elf_seg_map (abfd); m != NULL; m = m->next, p++)
if (m->p_type == PT_LOAD)
{
int i;
bfd_set_section_flags (abfd, ia64_info->root.sgot,
SEC_SMALL_DATA | flags);
/* The .got section is always aligned at 8 bytes. */
- bfd_set_section_alignment (abfd, ia64_info->root.sgot, 3);
+ if (! bfd_set_section_alignment (abfd, ia64_info->root.sgot, 3))
+ return FALSE;
}
if (!get_pltoff (abfd, info, ia64_info))
if (!dynobj)
ia64_info->root.dynobj = dynobj = abfd;
if (!_bfd_elf_create_got_section (dynobj, info))
- return 0;
+ return NULL;
got = ia64_info->root.sgot;
/* The .got section is always aligned at 8 bytes. */
if (!bfd_set_section_alignment (abfd, got, 3))
- return 0;
+ return NULL;
flags = bfd_get_section_flags (abfd, got);
- bfd_set_section_flags (abfd, got, SEC_SMALL_DATA | flags);
+ if (! bfd_set_section_flags (abfd, got, SEC_SMALL_DATA | flags))
+ return NULL;
}
return got;
|| 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;
h->ref_regular = 1;
}
else
}
static enum elf_reloc_type_class
-elfNN_ia64_reloc_type_class (const Elf_Internal_Rela *rela)
+elfNN_ia64_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ const asection *rel_sec ATTRIBUTE_UNUSED,
+ const Elf_Internal_Rela *rela)
{
switch ((int) ELFNN_R_TYPE (rela->r_info))
{