-/* Create .got, .gotplt, and .rela.got sections in DYNOBJ, and set up
- shortcuts to them in our hash table. */
-
-static bfd_boolean
-create_got_section (bfd *dynobj, struct bfd_link_info *info)
-{
- struct elf_nds32_link_hash_table *htab;
-
- if (!_bfd_elf_create_got_section (dynobj, info))
- return FALSE;
-
- htab = nds32_elf_hash_table (info);
- htab->sgot = bfd_get_section_by_name (dynobj, ".got");
- htab->sgotplt = bfd_get_section_by_name (dynobj, ".got.plt");
- if (!htab->sgot || !htab->sgotplt)
- abort ();
-
- /* _bfd_elf_create_got_section will create it for us. */
- htab->srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
- if (htab->srelgot == NULL
- || !bfd_set_section_flags (dynobj, htab->srelgot,
- (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY | SEC_LINKER_CREATED
- | SEC_READONLY))
- || !bfd_set_section_alignment (dynobj, htab->srelgot, 2))
- return FALSE;
-
- return TRUE;
-}
-