mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-21 18:39:34 +08:00
do not try to dump empty sections
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
Sun Sep 6 16:15:47 1998 Nick Clifton <nickc@cygnus.com>
|
||||||
|
|
||||||
|
* readelf.c (process_section_contents): Do not try to dump empty
|
||||||
|
sections.
|
||||||
|
|
||||||
Sat Sep 5 19:17:10 1998 Mumit Khan <khan@xraylith.wisc.edu>
|
Sat Sep 5 19:17:10 1998 Mumit Khan <khan@xraylith.wisc.edu>
|
||||||
|
|
||||||
* dlltool.c (scan_all_symbols): Don't re-export symbols exported
|
* dlltool.c (scan_all_symbols): Don't re-export symbols exported
|
||||||
|
@ -1023,6 +1023,7 @@ struct option options [] =
|
|||||||
{"sections", no_argument, 0, 'S'},
|
{"sections", no_argument, 0, 'S'},
|
||||||
{"section-headers", no_argument, 0, 'S'},
|
{"section-headers", no_argument, 0, 'S'},
|
||||||
{"symbols", no_argument, 0, 's'},
|
{"symbols", no_argument, 0, 's'},
|
||||||
|
{"syms", no_argument, 0, 's'},
|
||||||
{"relocs", no_argument, 0, 'r'},
|
{"relocs", no_argument, 0, 'r'},
|
||||||
{"dynamic", no_argument, 0, 'd'},
|
{"dynamic", no_argument, 0, 'd'},
|
||||||
{"version-info", no_argument, 0, 'V'},
|
{"version-info", no_argument, 0, 'V'},
|
||||||
@ -1051,7 +1052,7 @@ usage ()
|
|||||||
fprintf (stdout, _(" -S or --section-headers or --sections\n"));
|
fprintf (stdout, _(" -S or --section-headers or --sections\n"));
|
||||||
fprintf (stdout, _(" Display the sections' header\n"));
|
fprintf (stdout, _(" Display the sections' header\n"));
|
||||||
fprintf (stdout, _(" -e or --headers Equivalent to: -h -l -S\n"));
|
fprintf (stdout, _(" -e or --headers Equivalent to: -h -l -S\n"));
|
||||||
fprintf (stdout, _(" -s or --symbols Display the symbol table\n"));
|
fprintf (stdout, _(" -s or --syms or --symbols Display the symbol table\n"));
|
||||||
fprintf (stdout, _(" -r or --relocs Display the relocations (if present)\n"));
|
fprintf (stdout, _(" -r or --relocs Display the relocations (if present)\n"));
|
||||||
fprintf (stdout, _(" -d or --dynamic Display the dynamic segment (if present)\n"));
|
fprintf (stdout, _(" -d or --dynamic Display the dynamic segment (if present)\n"));
|
||||||
fprintf (stdout, _(" -V or --version-info Display the version sections (if present)\n"));
|
fprintf (stdout, _(" -V or --version-info Display the version sections (if present)\n"));
|
||||||
@ -3200,9 +3201,16 @@ process_section_contents (file)
|
|||||||
unsigned char * data;
|
unsigned char * data;
|
||||||
char * start;
|
char * start;
|
||||||
|
|
||||||
printf (_("\nHex dump of section '%s':\n"), SECTION_NAME (section));
|
|
||||||
|
|
||||||
bytes = section->sh_size;
|
bytes = section->sh_size;
|
||||||
|
|
||||||
|
if (bytes == 0)
|
||||||
|
{
|
||||||
|
printf (_("\nSection %d has no data to dump.\n"), i);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
printf (_("\nHex dump of section '%s':\n"), SECTION_NAME (section));
|
||||||
|
|
||||||
addr = section->sh_addr;
|
addr = section->sh_addr;
|
||||||
|
|
||||||
GET_DATA_ALLOC (section->sh_offset, bytes, start, char *,
|
GET_DATA_ALLOC (section->sh_offset, bytes, start, char *,
|
||||||
|
Reference in New Issue
Block a user