This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: m68k (elf) gas dwarf problem
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: "Joel Sherrill <joel at OARcorp dot com>" <joel dot sherrill at OARcorp dot com>
- Cc: Ralf Corsepius <corsepiu at faw dot uni-ulm dot de>,binutils at sources dot redhat dot com
- Date: Sat, 17 Apr 2004 21:31:15 +0930
- Subject: Re: m68k (elf) gas dwarf problem
- References: <40801C5D.40601@OARcorp.com>
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