Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/binutils/dist/bfd Modernize the error printing...



details:   https://anonhg.NetBSD.org/src/rev/a11a33be6792
branches:  trunk
changeset: 451264:a11a33be6792
user:      christos <christos%NetBSD.org@localhost>
date:      Sun May 12 22:42:33 2019 +0000

description:
Modernize the error printing for text relocations by syncing it to the
"more maintained" platforms.

diffstat:

 external/gpl3/binutils/dist/bfd/elf32-ppc.c |  13 ++++++++++---
 external/gpl3/binutils/dist/bfd/elf64-ppc.c |  14 +++++++++++---
 2 files changed, 21 insertions(+), 6 deletions(-)

diffs (47 lines):

diff -r 17b4a14d1dad -r a11a33be6792 external/gpl3/binutils/dist/bfd/elf32-ppc.c
--- a/external/gpl3/binutils/dist/bfd/elf32-ppc.c       Sun May 12 13:47:09 2019 +0000
+++ b/external/gpl3/binutils/dist/bfd/elf32-ppc.c       Sun May 12 22:42:33 2019 +0000
@@ -6616,9 +6616,16 @@
       struct bfd_link_info *info = (struct bfd_link_info *) info_p;
 
       info->flags |= DF_TEXTREL;
-      info->callbacks->minfo
-       (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"),
-        sec->owner, h->root.root.string, sec);
+      /* xgettext:c-format */
+      info->callbacks->minfo (_("%pB: dynamic relocation against `%pT' "
+                               "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)
+       /* xgettext:c-format */
+       info->callbacks->einfo (_("%P: %pB: warning: relocation against `%s' "
+                                 "in read-only section `%pA'\n"),
+                               sec->owner, h->root.root.string, sec);
 
       /* Not an error, just cut short the traversal.  */
       return FALSE;
diff -r 17b4a14d1dad -r a11a33be6792 external/gpl3/binutils/dist/bfd/elf64-ppc.c
--- a/external/gpl3/binutils/dist/bfd/elf64-ppc.c       Sun May 12 13:47:09 2019 +0000
+++ b/external/gpl3/binutils/dist/bfd/elf64-ppc.c       Sun May 12 22:42:33 2019 +0000
@@ -10260,9 +10260,17 @@
       struct bfd_link_info *info = (struct bfd_link_info *) inf;
 
       info->flags |= DF_TEXTREL;
-      info->callbacks->minfo
-       (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"),
-        sec->owner, h->root.root.string, sec);
+      /* xgettext:c-format */
+      info->callbacks->minfo (_("%pB: dynamic relocation against `%pT' "
+                               "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)
+       /* xgettext:c-format */
+       info->callbacks->einfo (_("%P: %pB: warning: relocation against `%s' "
+                                 "in read-only section `%pA'\n"),
+                               sec->owner, h->root.root.string, sec);
 
       /* Not an error, just cut short the traversal.  */
       return FALSE;



Home | Main Index | Thread Index | Old Index