This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH] ARM: objdump produces incorrect disassembly on multiple inputs
- From: Paul Brook <paul at codesourcery dot com>
- To: binutils at sourceware dot org
- Cc: Paul Carroll <pcarroll at codesourcery dot com>
- Date: Thu, 7 Apr 2011 14:27:24 +0100
- Subject: Re: [PATCH] ARM: objdump produces incorrect disassembly on multiple inputs
- References: <4D76BA21.firstname.lastname@example.org>
> The 'objdump' utility will not disassembly instructions correctly when
> it processes multiple ARM input files.
> That is, if you compare the disassembly of each file individually
> against the output produced by processing all of the files at once, the
> output is different.
> This is due to the ARM disassembler using a couple of global symbols to
> track symbol entries in a given input file.
> The problem is that these global symbols are initialized once, but never
> reset back to their starting values when a new input file begins
> processing. As a result, 'objdump's view of the symbols for the new
> input file is messed up.
> This patch adds a call to initialize those 2 values at the start of
> processing each ARM input file. This fix is ARM-specific.
Wouldn't it be better to use info->private_data ?