binutils-gdb/gas/doc
Mark Wielaard edc7a80a9c gas: Don't error when .debug_line already exists, unless .loc was used
When -g was used to generate DWARF gas would error out when a .debug_line
already exists. But when a .debug_info section already exists it would
simply skip generating one without warning or error. Do the same for
.debug_line. It is only an error when the user explicitly uses .loc
directives and also generates the .debug_line table itself.

The tests are unfortunately arch specific because the line table is only
generated when actual instructions have been emitted. Use i386 because
that is probably the most used architecture. Before this patch the new
dwarf-line-2 testcase would fail, with this patch it succeeds (and doesn't
try to add its own line table).

gas/ChangeLog:

    * as.texi (-g): Explicitly mention when .debug_info and .debug_line
    are generated for the DWARF format.
    (Loc): Add that it is an error to both use a .loc directive and
    generate a .debug_line yourself.
    * dwarf2dbg.c (dwarf2_any_loc_directive_seen): New static variable.
    (dwarf2_directive_loc): Set dwarf2_any_loc_directive_seen to TRUE.
    (dwarf2_finish): Check dwarf2_any_loc_directive_seen before emitting
    an error. Only create .debug_line if it is empty (or doesn't exist).
    * testsuite/gas/i386/i386.exp: Add dwarf2-line-{1,2,3,4} when testing
    an elf target.
    * testsuite/gas/i386/dwarf2-line-{1,2,3,4}.{s,d,l}: New test files.
2020-09-11 19:18:44 +02:00
..
all.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
as.texi gas: Don't error when .debug_line already exists, unless .loc was used 2020-09-11 19:18:44 +02:00
c-aarch64.texi aarch64: Add -mcpu option for Cortex-R82 2020-09-08 14:22:59 +01:00
c-alpha.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-arc.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-arm.texi [binutils][arm] arm support for ARMv8.m Custom Datapath Extension 2020-02-10 16:50:14 +00:00
c-avr.texi [PATCH] gas/doc: improve AVR modifiers wording. 2020-06-09 11:13:39 +01:00
c-bfin.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-bpf.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-cr16.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-cris.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-csky.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-d10v.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-d30v.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-epiphany.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-h8300.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-hppa.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-i386.texi x86: Add {disp16} pseudo prefix 2020-07-30 16:13:17 -07:00
c-ia64.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-ip2k.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-lm32.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-m32c.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-m32r.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-m68hc11.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-m68k.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-metag.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-microblaze.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-mips.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-mmix.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-msp430.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-mt.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-nds32.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-nios2.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-ns32k.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-or1k.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-pdp11.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-pj.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-ppc.texi Power10 tidies 2020-06-06 14:44:32 +09:30
c-pru.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-riscv.texi The description for -mno-csr-check talks about "cheching" rather than "checking". 2020-08-12 13:47:04 +01:00
c-rl78.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-rx.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-s12z.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-s390.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-score.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-sh.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-sparc.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-tic6x.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-tic54x.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-tilegx.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-tilepro.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-v850.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-vax.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-visium.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-wasm32.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-xc16x.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-xgate.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-xstormy16.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-xtensa.texi xtensa: allow runtime ABI selection 2020-06-15 13:01:30 -07:00
c-z8k.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
c-z80.texi gas/doc/c-z80.texi: Fix @xref warnings 2020-04-07 04:21:41 -07:00
fdl.texi
h8.texi Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
internals.texi Remove --reduce-memory-overheads and --hash-size arguments. 2020-08-20 10:57:52 +09:30
Makefile.am Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
Makefile.in Unify Solaris procfs and largefile handling 2020-07-30 15:41:50 +02:00