OSDN Git Service

* dwarf2dbg.c (out_debug_line): Ignore non-normal segments, with a
authornickc <nickc>
Thu, 28 Jul 2011 16:35:44 +0000 (16:35 +0000)
committernickc <nickc>
Thu, 28 Jul 2011 16:35:44 +0000 (16:35 +0000)
warning.
* doc/as.texinfo (Offset): Document .offset directive.

testsuite/
* gas/elf/warn-2.s: New.

gas/ChangeLog
gas/doc/as.texinfo
gas/dwarf2dbg.c
gas/testsuite/ChangeLog
gas/testsuite/gas/elf/elf.exp
gas/testsuite/gas/elf/warn-2.s [new file with mode: 0644]

index bcafeb0..eff3b25 100644 (file)
@@ -1,3 +1,9 @@
+2011-07-27  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * dwarf2dbg.c (out_debug_line): Ignore non-normal segments, with a
+       warning.
+       * doc/as.texinfo (Offset): Document .offset directive.
+
 2011-07-27  Tristan Gingold  <gingold@adacore.com>
 
        * frags.c (frag_grow): Revert previous patch.
index b617b3e..a2be539 100644 (file)
@@ -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}}
 
index 41fd014..31bf310 100644 (file)
@@ -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);
 }
index a4ad91b..568b104 100644 (file)
@@ -1,3 +1,8 @@
+2011-07-27  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * gas/elf/warn-2.s: New.
+       * gas/elf/elf.exp: Run the new test.
+
 2011-07-26  Kazuhiro Inaoka  <kazuhiro.inaoka.ud@renesas.com>
 
        * gas/rx/r-bcc.d: Update expected disassembly of synthetic beq.a
index 6eff0dd..0f5e97b 100644 (file)
@@ -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 (file)
index 0000000..0d69f10
--- /dev/null
@@ -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 }