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 more errors for text relocat...



details:   https://anonhg.NetBSD.org/src/rev/2b8c94dd5457
branches:  trunk
changeset: 347612:2b8c94dd5457
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Sep 05 14:25:33 2016 +0000

description:
more errors for text relocations

diffstat:

 external/gpl3/binutils/dist/bfd/elfxx-sparc.c |  8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diffs (18 lines):

diff -r 1549943a4a80 -r 2b8c94dd5457 external/gpl3/binutils/dist/bfd/elfxx-sparc.c
--- a/external/gpl3/binutils/dist/bfd/elfxx-sparc.c     Mon Sep 05 14:13:50 2016 +0000
+++ b/external/gpl3/binutils/dist/bfd/elfxx-sparc.c     Mon Sep 05 14:25:33 2016 +0000
@@ -2616,7 +2616,13 @@
                    srel = htab->elf.irelplt;
                  srel->size += p->count * SPARC_ELF_RELA_BYTES (htab);
                  if ((p->sec->output_section->flags & SEC_READONLY) != 0)
-                   info->flags |= DF_TEXTREL;
+                   {
+                     info->flags |= DF_TEXTREL;
+                     if ((info->warn_shared_textrel && bfd_link_pic (info))
+                       || info->error_textrel)
+                       info->callbacks->einfo (_("%P: %B: warning: relocation "
+                         "in readonly section `%A'\n"), p->sec->owner, p->sec);
+                   }
                }
            }
        }



Home | Main Index | Thread Index | Old Index