more errors for text relocations

This commit is contained in:
christos 2016-09-05 14:25:33 +00:00
parent 262a6229a0
commit 8514813e35

View File

@ -2616,7 +2616,13 @@ _bfd_sparc_elf_size_dynamic_sections (bfd *output_bfd,
srel = htab->elf.irelplt;
srel->size += p->count * SPARC_ELF_RELA_BYTES (htab);
if ((p->sec->output_section->flags & SEC_READONLY) != 0)
info->flags |= DF_TEXTREL;
{
info->flags |= DF_TEXTREL;
if ((info->warn_shared_textrel && bfd_link_pic (info))
|| info->error_textrel)
info->callbacks->einfo (_("%P: %B: warning: relocation "
"in readonly section `%A'\n"), p->sec->owner, p->sec);
}
}
}
}