slot[NUM_SLOTS];
segT last_text_seg;
+ subsegT last_text_subseg;
struct dynreg
{
saved_seg = now_seg;
saved_subseg = now_subseg;
- subseg_set (md.last_text_seg, 0);
+ subseg_set (md.last_text_seg, md.last_text_subseg);
while (md.num_slots_in_use > 0)
emit_one_bundle (); /* force out queued instructions */
{
symbolS *proc_end;
- subseg_set (md.last_text_seg, 0);
+ subseg_set (md.last_text_seg, md.last_text_subseg);
proc_end = expr_build_dot ();
start_unwind_section (saved_seg, SPECIAL_SECTION_UNWIND);
if (bfd_section_flags (now_seg) & SEC_CODE)
{
md.last_text_seg = now_seg;
+ md.last_text_subseg = now_subseg;
fix = XOBNEW (¬es, struct label_fix);
fix->sym = sym;
fix->next = CURR_SLOT.label_fixups;
insn_group_break (1, 0, 0);
md.last_text_seg = now_seg;
+ md.last_text_subseg = now_subseg;
done:
input_line_pointer = saved_input_line_pointer;
--- /dev/null
+#name: DWARF2 21
+#as: -gdwarf-2
+#readelf: -wL
+# Note that non-zero view numbers are allowed here. This doesn't really
+# make much sense, but DW_LNS_fixed_advance_pc is defined to not set the
+# view back to zero in contrast with all other changes in PC. A number
+# of targets always use DW_LNS_fixed_advance_pc in their gas-generated
+# line info.
+
+Contents of the \.debug_line section:
+
+CU: (.*/elf/dwarf2-21|tmpdir/asm)\.s:
+File name +Line number +Starting address +View +Stmt
+(dwarf2-21|asm)\.s +2 +0 +x
+(dwarf2-21|asm)\.s +4 +0x10(| +1) +x
+(dwarf2-21|asm)\.s +8 +0x20(| +2) +x
+(dwarf2-21|asm)\.s +6 +0x30(| +3) +x
+(dwarf2-21|asm)\.s +- +0x40
run_dump_test "dwarf2-18" $dump_opts
run_dump_test "dwarf2-19" $dump_opts
run_dump_test "dwarf2-20" $dump_opts
+ run_dump_test "dwarf2-21" $dump_opts
run_dump_test "dwarf-5-file0" $dump_opts
run_dump_test "dwarf-5-file0-2" $dump_opts
run_dump_test "dwarf-5-dir0" $dump_opts