info->flags |= DF_TEXTREL;
- if (info->warn_shared_textrel && info->shared)
- info->callbacks->einfo (_("%P: %B: warning: relocation against `%s' in readonly section `%A'.\n"),
+ if ((info->warn_shared_textrel && info->shared)
+ || 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);
&& (info->flags & DF_TEXTREL) == 0)
{
info->flags |= DF_TEXTREL;
- if (info->warn_shared_textrel && info->shared)
- info->callbacks->einfo (_("%P: %B: warning: relocation in readonly section `%A'.\n"),
+ if ((info->warn_shared_textrel && info->shared)
+ || info->error_textrel)
+ info->callbacks->einfo (_("%P: %B: warning: relocation in readonly section `%A'\n"),
p->sec->owner, p->sec);
}
}