[PATCH] Fix objdump -S with unit-at-a-time II
Nick Clifton
nickc@redhat.com
Mon Jun 18 16:37:00 GMT 2007
Hi Andi,
> 2007-06-01 Andi Kleen <ak@suse.de>
>
> * objdump.c: Include sys/mman.h
> (print_file_list): Remove f, add map, mapsize, linemap, maxline,
> last_line, first fields.
> (slurp_file): Add.
> (index_file): Add
> (print_file_open): Call slurp_file and index_file. Initialize new
> fields.
> (skip_to_line): Rename to print_line and write only single line.
> (dump_line): Add.
> (show_line): Change to new algorithm.
Approved and applied.
Note - I fixed a small bug in the index_file() code. It was possible
for the calculation that computes the new value for line_map_size to
return a value that was less than 'lineno + 1', so that you would then
corrupt memory when writing to linemap[lineno].
Cheers
Nick
More information about the Binutils
mailing list