Don't allow section switches in local asm instructions
commitd04ce7772c2bc2781ab2502e0b1f1964488814b5
authorMichael Matz <matz@suse.de>
Thu, 30 May 2019 19:31:35 +0000 (30 21:31 +0200)
committerMichael Matz <matz@suse.de>
Thu, 30 May 2019 19:31:35 +0000 (30 21:31 +0200)
tree6691b72e6352ee04978a5f5036e1b5944c199086
parent1dd6842654c8f8f6bf1a94364f0fd23ed10cc7e1
Don't allow section switches in local asm instructions

GCC wouldn't be able to implement this either (due to the separate
phases of compilation and assembly).  We could allow it but it
makes not much sense and actively can confuse broken code into
segfaulting TCC.  At least we can warn.

Warning exposes a problem in tcctest, and fixing that gives us
an opportunity to also test .pushsection/.popsection and .previous
directive support.
tccasm.c
tests/tcctest.c