PR 10413
* objdump.c (dump_section_header): Skip sections that we are ignoring.
This commit is contained in:
parent
c38fbd5cce
commit
d2fcac5caa
@ -1,3 +1,9 @@
|
|||||||
|
2009-07-27 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
PR 10413
|
||||||
|
* objdump.c (dump_section_header): Skip sections that we are
|
||||||
|
ignoring.
|
||||||
|
|
||||||
2009-07-25 H.J. Lu <hongjiu.lu@intel.com>
|
2009-07-25 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
* readelf.c (guess_is_rela): Handle EM_L1OM.
|
* readelf.c (guess_is_rela): Handle EM_L1OM.
|
||||||
|
@ -320,6 +320,23 @@ nonfatal (const char *msg)
|
|||||||
exit_status = 1;
|
exit_status = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Returns TRUE if the specified section should be dumped. */
|
||||||
|
|
||||||
|
static bfd_boolean
|
||||||
|
process_section_p (asection * section)
|
||||||
|
{
|
||||||
|
size_t i;
|
||||||
|
|
||||||
|
if (only == NULL)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
for (i = 0; i < only_used; i++)
|
||||||
|
if (strcmp (only [i], section->name) == 0)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
dump_section_header (bfd *abfd, asection *section,
|
dump_section_header (bfd *abfd, asection *section,
|
||||||
void *ignored ATTRIBUTE_UNUSED)
|
void *ignored ATTRIBUTE_UNUSED)
|
||||||
@ -332,6 +349,10 @@ dump_section_header (bfd *abfd, asection *section,
|
|||||||
if (section->flags & SEC_LINKER_CREATED)
|
if (section->flags & SEC_LINKER_CREATED)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
/* PR 10413: Skip sections that we are ignoring. */
|
||||||
|
if (! process_section_p (section))
|
||||||
|
return;
|
||||||
|
|
||||||
printf ("%3d %-13s %08lx ", section->index,
|
printf ("%3d %-13s %08lx ", section->index,
|
||||||
bfd_get_section_name (abfd, section),
|
bfd_get_section_name (abfd, section),
|
||||||
(unsigned long) bfd_section_size (abfd, section) / opb);
|
(unsigned long) bfd_section_size (abfd, section) / opb);
|
||||||
@ -1355,24 +1376,6 @@ objdump_sprintf (SFILE *f, const char *format, ...)
|
|||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Returns TRUE if the specified section should be dumped. */
|
|
||||||
|
|
||||||
static bfd_boolean
|
|
||||||
process_section_p (asection * section)
|
|
||||||
{
|
|
||||||
size_t i;
|
|
||||||
|
|
||||||
if (only == NULL)
|
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
for (i = 0; i < only_used; i++)
|
|
||||||
if (strcmp (only [i], section->name) == 0)
|
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* The number of zeroes we want to see before we start skipping them.
|
/* The number of zeroes we want to see before we start skipping them.
|
||||||
The number is arbitrarily chosen. */
|
The number is arbitrarily chosen. */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user