mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-23 18:14:13 +08:00
Re: objdump read_section_stabs
Commit f9c36cc995
changed (and renamed) read_section_stabs with one
difference in overall behaviour. Previously read_section_stabs would
return a NULL for an empty section, which was then treated the same as
a missing section. Now an empty section is recognized and dumped.
This leads to NULL stabp and stabs_end in print_section_stabs. Since
stabs_end - STABSIZE is then a pointer to a very large address, the
test "stabp < stabs_end - STABSIZE" succeeds.
* objdump.c (print_section_stabs): Correct STABSIZE comparison.
This commit is contained in:
parent
ee590ebd33
commit
45b36294d6
@ -4508,7 +4508,7 @@ print_section_stabs (bfd *abfd,
|
||||
|
||||
We start the index at -1 because there is a dummy symbol on
|
||||
the front of stabs-in-{coff,elf} sections that supplies sizes. */
|
||||
for (i = -1; stabp <= stabs_end - STABSIZE; stabp += STABSIZE, i++)
|
||||
for (i = -1; (size_t) (stabs_end - stabp) >= STABSIZE; stabp += STABSIZE, i++)
|
||||
{
|
||||
const char *name;
|
||||
unsigned long strx;
|
||||
|
Loading…
Reference in New Issue
Block a user