aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2003-10-30 14:24:02 +0000
committerNick Clifton <nickc@redhat.com>2003-10-30 14:24:02 +0000
commite69f2d21940833b10a83f2483981133631efa112 (patch)
treecf9c3c490aa809cbc7a2ec2f37fcd428b129ce62 /binutils
parent68b6ddd08f8b349f4da7d3a2da151a482db36115 (diff)
downloadgdb-e69f2d21940833b10a83f2483981133631efa112.zip
gdb-e69f2d21940833b10a83f2483981133631efa112.tar.gz
gdb-e69f2d21940833b10a83f2483981133631efa112.tar.bz2
Do not dump the contents of SHT_NOBITS sections - they have no file space
assigned to their contents.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog5
-rw-r--r--binutils/readelf.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 5705585..4806e9c 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,8 @@
+2003-10-30 Marshall T. Vandegrift <llasram at wuli dot nu>
+
+ * readelf.c (dump_section): Do not dump the contents of SHT_NOBITS
+ sections - they have no file space assigned to their contents.
+
2003-10-28 Segher Boessenkool <segher@kernel.crashing.org>
* readelf.c (dump_section): Don't display DEL characters.
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 629db76..fb8d80f 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -6055,7 +6055,7 @@ dump_section (Elf_Internal_Shdr *section, FILE *file)
bytes = section->sh_size;
- if (bytes == 0)
+ if (bytes == 0 || section->sh_type == SHT_NOBITS)
{
printf (_("\nSection '%s' has no data to dump.\n"),
SECTION_NAME (section));