? elfxx-sparc.c.diff ? o Index: elfxx-sparc.c =================================================================== RCS file: /cvsroot/src/external/gpl3/binutils/dist/bfd/elfxx-sparc.c,v retrieving revision 1.8 diff -u -p -u -r1.8 elfxx-sparc.c --- elfxx-sparc.c 15 Jun 2016 14:47:23 -0000 1.8 +++ elfxx-sparc.c 5 Sep 2016 08:46:23 -0000 @@ -2514,12 +2514,14 @@ readonly_dynrelocs (struct elf_link_hash { struct bfd_link_info *info = (struct bfd_link_info *) inf; - if (info->warn_shared_textrel) - (*_bfd_error_handler) - (_("warning: dynamic relocation to `%s' in readonly section `%s'"), - h->root.root.string, s->name); info->flags |= DF_TEXTREL; + if ((info->warn_shared_textrel && bfd_link_pic (info)) + || info->error_textrel) + info->callbacks->einfo (_("%P: %B: warning: relocation against `%s' in readonly section `%A'\n"), + p->sec->owner, h->root.root.string, + p->sec); + /* Not an error, just cut short the traversal. */ return FALSE; }