This is the mail archive of the binutils@sources.redhat.com 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: m68k (elf) gas dwarf problem


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


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