[PATCH 2/4] pe/coff: Don't interpret debug directory in section with no contents
Jon TURNEY
jon.turney@dronecode.org.uk
Thu Apr 10 17:45:00 GMT 2014
For 'objdump -p', don't try to interpret the contents of a debug directory in a
section with no contents.
The meaning of a series of zeros is not very interesting.
bfd/ChangeLog:
2014-04-10 Jon TURNEY <jon.turney@dronecode.org.uk>
* peXXigen.c (pe_print_debugdata): Don't interpret debug directory
in a section with no contents.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
---
bfd/peXXigen.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c
index ebb80b1..c00a655 100644
--- a/bfd/peXXigen.c
+++ b/bfd/peXXigen.c
@@ -2388,6 +2388,13 @@ pe_print_debugdata (bfd * abfd, void * vfile)
_("\nThere is a debug directory, but the section containing it could not be found\n"));
return TRUE;
}
+ else if (!(section->flags & SEC_HAS_CONTENTS))
+ {
+ fprintf (file,
+ _("\nThere is a debug directory in %s, but that section has no contents\n"),
+ section->name);
+ return TRUE;
+ }
fprintf (file, _("\nThere is a debug directory in %s at 0x%lx\n\n"),
section->name, (unsigned long) addr);
--
1.8.3.4
More information about the Binutils
mailing list