This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] ARM Disassembler fix


Hi Nick,

Nick Clifton wrote:
Hi Daniel,

The attached patch fixes a bug that causes the disassembler to dump code when it should dump data.

This looks wrong to me. Why should the disassembler assume that, in the absence of mapping symbols to guide it, the .text section contains data rather than instructions ? Surely it is more likely to contain instructions and it is merely that the mapping symbols are absent ?

Please refer to the AAELF, i.e. IHI0044D pp 23, @4.6.5.1, e.g.
"A section must have a mapping symbol defined at the beginning of the section; however, if the section contains only data then the mapping symbol may be omitted."


As a more concrete example, on v7-M targets, an embedded application will typically start with an exception vector table, which should be disassembled as data.
(whether this would be part of .text is questionable, but definitely plausible.)


--
Daniel Gutson
CodeSourcery
www.codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]