[GAS] fix crash on erroneous directive

Nathan Sidwell nathan@codesourcery.com
Wed Jul 27 12:33:00 GMT 2011


If one uses --gdwarf2 to emit line number directives, and write code to the 
*ABS* section, dwarf2bdg crashes with:

/home/nathan/binutils/src/gas/testsuite/gas/all//warn-2.s: Assembler messages:
/home/nathan/binutils/src/gas/testsuite/gas/all//warn-2.s: Internal error! 
Assertion failure in emit_inc_line_addr at ../../src/gas/dwarf2dbg.c line 926.
Please report this bug.

Why would someone write code to *ABS*?  well, the undocumented .offset directive 
switches to that section, and furthermore, some other assemblers use .offset to 
do what gas uses .org to do, which is unfortunate.

This patch (a) documents the .offset directive, pointing out not to confuse it 
with .org, and (b) stops dwarf2dbg from crashing, instead emitting a warning.

tested on i686-pc-linux-gnu, ok?

nathan
-- 
Nathan Sidwell

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dwarf.patch
Type: text/x-patch
Size: 2958 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20110727/681b5e0e/attachment.bin>


More information about the Binutils mailing list