While building Linux kernel for 32-bit ARM with LLVM's integrated assembler, I ran into the following error: $ ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make -j32 CC=clang AS=clang arch/arm/mm/proc-v7.o arch/arm/mm/proc-v7.S:169:143: error: expected absolute expression .pushsection ".alt.smp.init", "a" ; .long 9998b ;9997: orr r1, r1, #((1 << 0) | (1 << 6))|(3 << 3) ; .if . - 9997b == 2 ; nop ; .endif ; .if . - 9997b != 4 ; .error "ALT_UP() content must assemble to exactly 4 bytes"; .endif ; .popsection The reason is in "if . - 9997b == 2" directive the temporary label created for the dot symbol and 9997 get assigned to two adjacent MCFragments in the same MCSection.
https://reviews.llvm.org/D69411
Fixed on kernel https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=790756c7e0229dedc83bf058ac69633045b1000e
Please ignore my last comment. It was supposed to be for a different bug.
https://reviews.llvm.org/D69411 accepted and merged.