From: Nick Clifton Date: Thu, 28 Jul 2011 16:35:48 +0000 (+0000) Subject: * dwarf2dbg.c (out_debug_line): Ignore non-normal segments, with a X-Git-Tag: sid-snapshot-20110801~25 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9aec20268e477ab268c345b58e6659b622028536;p=external%2Fbinutils.git * dwarf2dbg.c (out_debug_line): Ignore non-normal segments, with a warning. * doc/as.texinfo (Offset): Document .offset directive. testsuite/ * gas/elf/warn-2.s: New. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index bcafeb0..eff3b25 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2011-07-27 Nathan Sidwell + + * dwarf2dbg.c (out_debug_line): Ignore non-normal segments, with a + warning. + * doc/as.texinfo (Offset): Document .offset directive. + 2011-07-27 Tristan Gingold * frags.c (frag_grow): Revert previous patch. diff --git a/gas/doc/as.texinfo b/gas/doc/as.texinfo index b617b3e..a2be539 100644 --- a/gas/doc/as.texinfo +++ b/gas/doc/as.texinfo @@ -4017,6 +4017,7 @@ Some machine configurations provide additional directives. * 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 @@ -5480,6 +5481,15 @@ bignum, it emits a 16-byte integer. 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}} diff --git a/gas/dwarf2dbg.c b/gas/dwarf2dbg.c index 41fd014..31bf310 100644 --- a/gas/dwarf2dbg.c +++ b/gas/dwarf2dbg.c @@ -1459,7 +1459,11 @@ out_debug_line (segT line_seg) /* For each section, emit a statement program. */ for (s = all_segs; s; s = s->next) - process_entries (s->seg, s->head->head); + 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); } diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index a4ad91b..568b104 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-07-27 Nathan Sidwell + + * gas/elf/warn-2.s: New. + * gas/elf/elf.exp: Run the new test. + 2011-07-26 Kazuhiro Inaoka * gas/rx/r-bcc.d: Update expected disassembly of synthetic beq.a diff --git a/gas/testsuite/gas/elf/elf.exp b/gas/testsuite/gas/elf/elf.exp index 6eff0dd..0f5e97b 100644 --- a/gas/testsuite/gas/elf/elf.exp +++ b/gas/testsuite/gas/elf/elf.exp @@ -181,4 +181,10 @@ if { ([istarget "*-*-*elf*"] run_dump_test "dwarf2-4" run_dump_test "bad-section-flag" run_dump_test "bad-size" + +load_lib gas-dg.exp +dg-init +dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/err-*.s $srcdir/$subdir/warn-*.s]] "" "" +dg-finish + } diff --git a/gas/testsuite/gas/elf/warn-2.s b/gas/testsuite/gas/elf/warn-2.s new file mode 100644 index 0000000..0d69f10 --- /dev/null +++ b/gas/testsuite/gas/elf/warn-2.s @@ -0,0 +1,12 @@ +;# { dg-do assemble } +;# { dg-skip-if "DWARF2 output not supported" { mcore-*-* mn10*-*-* moxie-*-* v850-*-* } } +;# { dg-skip-if "no NOP opcode" { mmix-*-* openrisc-*-* or32-*-* } } +;# { dg-options "--gdwarf2 --defsym ia64=0" } +;# { dg-options "--gdwarf2 --defsym ia64=1" { target ia64-*-* i370-*-* } } + .offset 40 +.ifeq ia64 - 1 + nop 0 +.else + nop +.endif +;# { dg-warning "Warning: dwarf line number information for .* ignored" "" { target *-*-* } 0 }