* 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.
This commit is contained in:
Nick Clifton 2011-07-28 16:35:48 +00:00
parent d91a6875d0
commit 9aec20268e
6 changed files with 44 additions and 1 deletions

View 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.

View 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}}

View 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);
}

View 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

View 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
}

View File

@ -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 }