This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] x86: Print dynreloc in readonly section for map file output


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=92f402a7e03f5d747bc9a09c8da2f61cc539ac33

commit 92f402a7e03f5d747bc9a09c8da2f61cc539ac33
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri Dec 1 04:01:11 2017 -0800

    x86: Print dynreloc in readonly section for map file output
    
    This fixed:
    
    FAIL: DT_TEXTREL map file warning
    
    on Linux/x86.
    
    	* elfxx-x86.c (_bfd_x86_elf_readonly_dynrelocs): Print dynamic
    	relocation in readonly section for map file output.

Diff:
---
 bfd/ChangeLog   | 5 +++++
 bfd/elfxx-x86.c | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index ae28970..95fb5cd 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2017-12-01  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elfxx-x86.c (_bfd_x86_elf_readonly_dynrelocs): Print symbol
+	for map file output.
+
 2017-12-01  Alan Modra  <amodra@gmail.com>
 
 	* elf32-hppa.c (maybe_set_textrel): Print symbol for map file output.
diff --git a/bfd/elfxx-x86.c b/bfd/elfxx-x86.c
index ecb8b9d..3899c13 100644
--- a/bfd/elfxx-x86.c
+++ b/bfd/elfxx-x86.c
@@ -551,6 +551,11 @@ _bfd_x86_elf_readonly_dynrelocs (struct elf_link_hash_entry *h,
 	    info->callbacks->einfo (_("%P: %B: warning: relocation against `%s' in readonly section `%A'\n"),
 				    p->sec->owner, h->root.root.string,
 				    p->sec);
+	  else
+	    /* xgettext:c-format */
+	    info->callbacks->minfo
+	      (_("%B: dynamic relocation against `%T' in read-only section `%A'\n"),
+	       p->sec->owner, h->root.root.string, p->sec);
 
 	  /* Not an error, just cut short the traversal.  */
 	  return FALSE;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]