dwarf2 sub-section test
authorAlan Modra <amodra@gmail.com>
Tue, 21 Sep 2021 23:34:00 +0000 (09:04 +0930)
committerAlan Modra <amodra@gmail.com>
Wed, 22 Sep 2021 00:54:05 +0000 (10:24 +0930)
commitcf11ebea1206a7c459a94fef8e0880087dd9f38f
tree40ac307ae5a4110f0516a5e19b43e65c81bd7d2a
parented41b9cdb293630d57d294d756f8d08b0cff983d
dwarf2 sub-section test

This is a testcase for the bug fixed by commit 5b4846283c3d.  When
running the testcase on ia64 targets I found timeouts along with lots
of memory being consumed, due to ia64 gas not tracking text
sub-sections.  Trying to add nops for ".nop 16" in ".text 1" resulting
in them being added to subsegment 0, with no increase to subsegment 1
size.  This patch also fixes that problem.

Note that the testcase fails on ft32-elf, mn10200-elf, score-elf,
tic5x-elf, and xtensa-elf.  The first two are relocation errors, the
last three appear to be the .nop directive failing to emit the right
number of nops.  I didn't XFAIL any of them.

* config/tc-ia64.c (md): Add last_text_subseg.
(ia64_flush_insns, dot_endp): Use last_text_subseg.
(ia64_frob_label, md_assemble): Set last_text_subseg.
* testsuite/gas/elf/dwarf2-21.d,
* testsuite/gas/elf/dwarf2-21.s: New test.
* testsuite/gas/elf/elf.exp: Run it.
gas/config/tc-ia64.c
gas/testsuite/gas/elf/dwarf2-21.d [new file with mode: 0644]
gas/testsuite/gas/elf/dwarf2-21.s [new file with mode: 0644]
gas/testsuite/gas/elf/elf.exp