From: nickc Date: Thu, 30 Oct 2003 14:24:01 +0000 (+0000) Subject: Do not dump the contents of SHT_NOBITS sections - they have no file space X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=fcfcb86426e35d5cc75f19d47ac84ddf3f5b25e7;p=pf3gnuchains%2Fsourceware.git Do not dump the contents of SHT_NOBITS sections - they have no file space assigned to their contents. --- diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 57055852d9..4806e9ccf1 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +2003-10-30 Marshall T. Vandegrift + + * 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 * readelf.c (dump_section): Don't display DEL characters. diff --git a/binutils/readelf.c b/binutils/readelf.c index 629db76a7b..fb8d80f837 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));