ld: Add --warn-textrel and obsolete --warn-shared-textrel
[deliverable/binutils-gdb.git] / bfd / elfxx-x86.c
index 9679dca981e77923e7ad2c0bccd5bdb827cba6e5..6cc47afd7eadc1b6f5b42a33cf84dbd6183effda 100644 (file)
@@ -575,8 +575,7 @@ maybe_set_textrel (struct elf_link_hash_entry *h, void *inf)
                                "in read-only section `%pA'\n"),
                              sec->owner, h->root.root.string, sec);
 
-      if ((info->warn_shared_textrel && bfd_link_pic (info))
-         || info->error_textrel)
+      if (bfd_link_textrel_check (info))
        /* xgettext:c-format */
        info->callbacks->einfo (_("%P: %pB: warning: relocation against `%s' "
                                  "in read-only section `%pA'\n"),
@@ -1117,8 +1116,7 @@ _bfd_x86_elf_size_dynamic_sections (bfd *output_bfd,
                      && (info->flags & DF_TEXTREL) == 0)
                    {
                      info->flags |= DF_TEXTREL;
-                     if ((info->warn_shared_textrel && bfd_link_pic (info))
-                         || info->error_textrel)
+                     if (bfd_link_textrel_check (info))
                        /* xgettext:c-format */
                        info->callbacks->einfo
                          (_("%P: %pB: warning: relocation "
This page took 0.024213 seconds and 4 git commands to generate.