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/7d9668df9f04
branches:  trunk
changeset: 841407:7d9668df9f04
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 961758756363 -r 7d9668df9f04 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 961758756363 -r 7d9668df9f04 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