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] Handle printing information about PE format files which have 0 as the value of the HInt Table in the


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

commit 9949827bea788753c29b7bb503d6d5dda6ea21ff
Author: Daniel Bonniot de Ruisselet <bonniot@gmail.com>
Date:   Tue Jun 6 15:06:02 2017 +0100

    Handle printing information about PE format files which have 0 as the value of the HInt Table in the import tables structure.
    
    	PR binutils/21546
    	* peXXigen.c (pe_print_idata): Use the address of the first thunk
    	if the hint address is zero.

Diff:
---
 bfd/ChangeLog  | 6 ++++++
 bfd/peXXigen.c | 5 +++++
 2 files changed, 11 insertions(+)

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index adef934..4992fd1 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2017-06-06  Daniel Bonniot de Ruisselet  <bonniot@gmail.com>
+
+	PR binutils/21546
+	* peXXigen.c (pe_print_idata): Use the address of the first thunk
+	if the hint address is zero.
+
 2017-06-06  James Clarke  <jrtc27@jrtc27.com>
 
 	PR ld/19579
diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c
index 27a75b3..a18e0b2 100644
--- a/bfd/peXXigen.c
+++ b/bfd/peXXigen.c
@@ -1432,6 +1432,11 @@ pe_print_idata (bfd * abfd, void * vfile)
       bfd_size_type maxlen = (char *)(data + datasize) - dll - 1;
       fprintf (file, _("\n\tDLL Name: %.*s\n"), (int) maxlen, dll);
 
+      /* PR 21546: When the Hint Address is zero,
+	 we try the First Thunk instead.  */
+      if (hint_addr == 0)
+	hint_addr = first_thunk;
+
       if (hint_addr != 0)
 	{
 	  bfd_byte *ft_data;


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