m68k (elf) gas dwarf problem
Alan Modra
amodra@bigpond.net.au
Sat Apr 17 12:06:00 GMT 2004
On Fri, Apr 16, 2004 at 12:48:13PM -0500, Joel Sherrill <joel@OARcorp.com> wrote:
> s1.s:926: Error: unaligned opcodes detected in executable segment
>
> So adding the --gdwarf2 results in the unaligned error.
>
> Is this a bug or is something wrong with the assembly code?
I'll tell you what is happening, and you can judge whether it's a bug or
whether the assembly is invalid. :)
tc-m68k.h defines DWARF2_LINE_MIN_INSN_LENGTH to 2, because all m68k
instructions are a multiple of 2 bytes long. This allows dwarf2 address
information to drop the redundant zero lsb, potentially allowing smaller
debug info. In your testcase, you emit single byte values to .text,
breaking the assumption that anything in .text requiring address
location info will be at an even address.
--
Alan Modra
IBM OzLabs - Linux Technology Centre
More information about the Binutils
mailing list