[gas] Emit v2 .debug_line for -gdwarf-2
Currently, when using -gdwarf-2, gas emits a v3 .debug_line contribution.
Fix this by emitting a v2 .debug_line contribution instead.
gas/ChangeLog:
2023-01-31 Tom de Vries <tdevries@suse.de>
PR 23941
* dwarf2dbg.c (DWARF2_LINE_VERSION): Set to 2 for -gdwarf-2.
(DWARF2_LINE_OPCODE_BASE): Handle DWARF2_LINE_VERSION == 2.
(dwarf2_directive_loc): Bump dwarf_level when encountering
v3 .loc options.
(out_debug_line): Don't output v3 standard opcodes for v2.
* testsuite/gas/i386/debug1.d: Update.
* testsuite/gas/i386/dwarf2-line-1.d: Update.
* testsuite/gas/i386/dwarf2-line-4.d: Update.