This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: RFC: Prevent disassembly beyond symbolic boundaries
- From: Erik Christiansen <dvalin at internode dot on dot net>
- To: binutils at sourceware dot org
- Date: Fri, 19 Jun 2015 22:42:29 +1000
- Subject: Re: RFC: Prevent disassembly beyond symbolic boundaries
- Authentication-results: sourceware.org; auth=none
- References: <87lhfhynoz dot fsf at redhat dot com> <3D81F97D-90EA-4769-8381-514BB6E81E3F at adacore dot com> <5583FFEE dot 6060106 at redhat dot com>
- Reply-to: dvalin at internode dot on dot net
On 19.06.15 12:41, Nicholas Clifton wrote:
> The point being that if there is a symbol that is in the middle of an
> instruction then something hinky is going on. Either the symbol is
> misplaced or the instruction is not really an instruction or else an
> assembly programmer is being extra super clever and hiding data
> inside instructions.
One thing we did more than three decades ago, when memory cost money,
was to pass constant parameters in-line after a function call, so the
register loading instructions occurred only once, inside the function.
The price was no more than indirect loads. Incrementing the return
address came for free, as the data was read.
There is so little memory in today's smaller AVR devices, that one could
be tempted to resurrect the practice, in extremis.
The change is attractive, double reporting of bytes much less so.
Erik