This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: fix alpha ld nop fill
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Richard Henderson <rth at redhat dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Sat, 16 Feb 2002 12:52:37 +1030
- Subject: Re: fix alpha ld nop fill
- References: <20020215154327.A8637@redhat.com>
On Fri, Feb 15, 2002 at 03:43:27PM -0800, Richard Henderson wrote:
> I'd previously missed the fact that the fill string is always
> big-endian
I thought about fixing this, as it's a problem for targets that
run both big and little-endian. eg, elf32mcore.sh says:
# There is a problem with the NOP value - it must work for both
# big endian and little endian systems. Unfortunately there is
# no symmetrical mcore opcode that functions as a noop. The
# chosen solution is to use "tst r0, r14". This is a symetrical
# value, and apart from the corruption of the C bit, it has no other
# side effects. Since the carry bit is never tested without being
# explicitly set first, and since the NOP code is only used as a
# fill value between independantly viable peices of code, it should
# not matter.
NOP=0x0e0e0e0e
Worse, there is at least one bi-endian target that blindly
ignores the problem, and only gets the nop correct for the default
endianness.
Of course, if we do store the fill value correctly for the target
endianness, then we break any hand-crafted linker scripts on little
endian targets that already work around the issue.
Opinions?
--
Alan Modra
IBM OzLabs - Linux Technology Centre