aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-tilepro.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf32-tilepro.c')
-rw-r--r--bfd/elf32-tilepro.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/bfd/elf32-tilepro.c b/bfd/elf32-tilepro.c
index 899abdd..fa883e1 100644
--- a/bfd/elf32-tilepro.c
+++ b/bfd/elf32-tilepro.c
@@ -1224,8 +1224,8 @@ tilepro_elf_create_got_section (bfd *abfd, struct bfd_link_info *info)
struct elf_link_hash_table *htab = elf_hash_table (info);
/* This function may be called more than once. */
- s = bfd_get_section_by_name (abfd, ".got");
- if (s != NULL && (s->flags & SEC_LINKER_CREATED) != 0)
+ s = bfd_get_linker_section (abfd, ".got");
+ if (s != NULL)
return TRUE;
flags = bed->dynamic_sec_flags;
@@ -1297,9 +1297,9 @@ tilepro_elf_create_dynamic_sections (bfd *dynobj,
if (!_bfd_elf_create_dynamic_sections (dynobj, info))
return FALSE;
- htab->sdynbss = bfd_get_section_by_name (dynobj, ".dynbss");
+ htab->sdynbss = bfd_get_linker_section (dynobj, ".dynbss");
if (!info->shared)
- htab->srelbss = bfd_get_section_by_name (dynobj, ".rela.bss");
+ htab->srelbss = bfd_get_linker_section (dynobj, ".rela.bss");
if (!htab->elf.splt || !htab->elf.srelplt || !htab->sdynbss
|| (!info->shared && !htab->srelbss))
@@ -2427,7 +2427,7 @@ tilepro_elf_size_dynamic_sections (bfd *output_bfd,
/* Set the contents of the .interp section to the interpreter. */
if (info->executable)
{
- s = bfd_get_section_by_name (dynobj, ".interp");
+ s = bfd_get_linker_section (dynobj, ".interp");
BFD_ASSERT (s != NULL);
s->size = sizeof ELF32_DYNAMIC_INTERPRETER;
s->contents = (unsigned char *) ELF32_DYNAMIC_INTERPRETER;
@@ -3775,8 +3775,7 @@ tilepro_elf_finish_dynamic_symbol (bfd *output_bfd,
/* This symbols needs a copy reloc. Set it up. */
BFD_ASSERT (h->dynindx != -1);
- s = bfd_get_section_by_name (h->root.u.def.section->owner,
- ".rela.bss");
+ s = htab->srelbss;
BFD_ASSERT (s != NULL);
rela.r_offset = (h->root.u.def.value
@@ -3851,14 +3850,14 @@ tilepro_elf_finish_dynamic_sections (bfd *output_bfd,
BFD_ASSERT (htab != NULL);
dynobj = htab->elf.dynobj;
- sdyn = bfd_get_section_by_name (dynobj, ".dynamic");
+ sdyn = bfd_get_linker_section (dynobj, ".dynamic");
if (elf_hash_table (info)->dynamic_sections_created)
{
asection *splt;
bfd_boolean ret;
- splt = bfd_get_section_by_name (dynobj, ".plt");
+ splt = htab->elf.splt;
BFD_ASSERT (splt != NULL && sdyn != NULL);
ret = tilepro_finish_dyn (output_bfd, info, dynobj, sdyn, splt);