/* 32-bit ELF support for S+core.
- Copyright (C) 2006-2016 Free Software Foundation, Inc.
+ Copyright (C) 2006-2017 Free Software Foundation, Inc.
Contributed by
Brain.lin (brain.lin@sunplusct.com)
Mei Ligang (ligang@sunnorth.com.cn)
/* We have to use an alignment of 2**4 here because this is hardcoded
in the function stub generation and in the linker script. */
s = bfd_make_section_anyway_with_flags (abfd, ".got", flags);
- if (s == NULL
+ elf_hash_table (info)->sgot = s;
+ if (s == NULL
|| ! bfd_set_section_alignment (abfd, s, 4))
return FALSE;
h->non_elf = 0;
h->def_regular = 1;
h->type = STT_OBJECT;
+ elf_hash_table (info)->hgot = h;
if (bfd_link_pic (info) && ! bfd_elf_link_record_dynamic_symbol (info, h))
return FALSE;
else if (r_symndx >= extsymoff + NUM_SHDR_ENTRIES (symtab_hdr))
{
_bfd_error_handler
+ /* xgettext:c-format */
(_("%s: Malformed reloc detected for section %s"), abfd, name);
bfd_set_error (bfd_error_bad_value);
return FALSE;
if (h == NULL)
{
_bfd_error_handler
+ /* xgettext:c-format */
(_("%B: CALL15 reloc at 0x%lx not against global symbol"),
abfd, (unsigned long) rel->r_offset);
bfd_set_error (bfd_error_bad_value);
break;
case DT_PLTGOT:
- name = ".got";
- s = bfd_get_linker_section (dynobj, name);
+ s = elf_hash_table (info)->sgot;
dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
break;