From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14999 invoked by alias); 28 Jul 2011 09:16:26 -0000 Received: (qmail 14990 invoked by uid 22791); 28 Jul 2011 09:16:24 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,TW_GD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 28 Jul 2011 09:16:07 +0000 Received: (qmail 28270 invoked from network); 28 Jul 2011 09:16:05 -0000 Received: from unknown (HELO ?192.168.44.101?) (nathan@127.0.0.2) by mail.codesourcery.com with ESMTPA; 28 Jul 2011 09:16:05 -0000 Message-ID: <4E3128D2.8020205@codesourcery.com> Date: Thu, 28 Jul 2011 14:03:00 -0000 From: Nathan Sidwell User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110617 Lightning/1.0b2 Thunderbird/3.1.11 MIME-Version: 1.0 To: Andreas Schwab CC: binutils Subject: Re: [GAS] fix crash on erroneous directive References: <4E2FF98E.4040608@codesourcery.com> <4E3005A0.9020902@codesourcery.com> In-Reply-To: Content-Type: multipart/mixed; boundary="------------000508090109080701060300" Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2011-07/txt/msg00250.txt.bz2 This is a multi-part message in MIME format. --------------000508090109080701060300 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 168 On 07/27/11 15:04, Andreas Schwab wrote: > You could define a symbol and then use to the right nop depending on the > symbol's value. like this? -- Nathan Sidwell --------------000508090109080701060300 Content-Type: text/x-patch; name="dwarf.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="dwarf.patch" Content-length: 3098 2011-07-27 Nathan Sidwell * dwarf2dbg.c (out_debug_line): Ignore non-normal segments, with a warning. * doc/as.texinfo (Offset): Document .offset directive. testsuite/ * gas/all/warn-2.s: New. Index: dwarf2dbg.c =================================================================== RCS file: /cvs/src/src/gas/dwarf2dbg.c,v retrieving revision 1.111 diff -c -3 -p -r1.111 dwarf2dbg.c *** dwarf2dbg.c 31 Mar 2011 08:02:41 -0000 1.111 --- dwarf2dbg.c 28 Jul 2011 09:14:37 -0000 *************** out_debug_line (segT line_seg) *** 1459,1465 **** /* For each section, emit a statement program. */ for (s = all_segs; s; s = s->next) ! process_entries (s->seg, s->head->head); symbol_set_value_now (line_end); } --- 1459,1469 ---- /* For each section, emit a statement program. */ for (s = all_segs; s; s = s->next) ! if (SEG_NORMAL (s->seg)) ! process_entries (s->seg, s->head->head); ! else ! as_warn ("dwarf line number information for %s ignored", ! segment_name (s->seg)); symbol_set_value_now (line_end); } Index: doc/as.texinfo =================================================================== RCS file: /cvs/src/src/gas/doc/as.texinfo,v retrieving revision 1.238 diff -c -3 -p -r1.238 as.texinfo *** doc/as.texinfo 24 Jul 2011 14:20:09 -0000 1.238 --- doc/as.texinfo 28 Jul 2011 09:14:40 -0000 *************** Some machine configurations provide addi *** 4017,4022 **** --- 4017,4023 ---- * Noaltmacro:: @code{.noaltmacro} * Nolist:: @code{.nolist} * Octa:: @code{.octa @var{bignums}} + * Offset:: @code{.offset @var{loc}} * Org:: @code{.org @var{new-lc}, @var{fill}} * P2align:: @code{.p2align @var{abs-expr}, @var{abs-expr}, @var{abs-expr}} @ifset ELF *************** bignum, it emits a 16-byte integer. *** 5480,5485 **** --- 5481,5495 ---- The term ``octa'' comes from contexts in which a ``word'' is two bytes; hence @emph{octa}-word for 16 bytes. + @node Offset + @section @code{.offset @var{loc}} + + @cindex @code{offset} directive + Set the location counter to @var{loc} in the absolute section. @var{loc} must + be an absolute expression. This directive may be useful for defining + symbols with absolute values. Do not confuse it with the @code{.org} + directive. + @node Org @section @code{.org @var{new-lc} , @var{fill}} Index: testsuite/gas/all/warn-2.s =================================================================== RCS file: testsuite/gas/all/warn-2.s diff -N testsuite/gas/all/warn-2.s *** /dev/null 1 Jan 1970 00:00:00 -0000 --- testsuite/gas/all/warn-2.s 28 Jul 2011 09:14:40 -0000 *************** *** 0 **** --- 1,10 ---- + ;# { dg-do assemble } + ;# { dg-options "--gdwarf2 --defsym ia64=0" } + ;# { dg-options "--gdwarf2 --defsym ia64=1" { target ia64-*-* } } + .offset 40 + .ifeq ia64 - 1 + nop 0 + .else + nop + .endif + ;# { dg-warning "Warning: dwarf line number information for .* ignored" "" { target *-*-* } 0 } --------------000508090109080701060300--