arch/arm/kernel/sleep.S:149:20: error: invalid reassignment of non-absolute variable 'up_b_offset' in '.equ' directive
| Bugzilla Link | 45248 |
| Resolution | FIXED |
| Resolved on | Dec 17, 2020 16:58 |
| Version | trunk |
| OS | All |
Extended Description
Building arch/arm/kernel/sleep.S in linux kernel for ARM with integrated assembler ended up with the following assertion failure:
arch/arm/kernel/sleep.S:149:20: error: invalid reassignment of non-absolute variable 'up_b_offset' in '.equ' directive .equ up_b_offset, 1f - 9998b ; .pushsection ".alt.smp.init", "a" ; .long 9998b ; b . + up_b_offset ; .popsection
I was able to reduce the code to as follows, using X86 assembly,
$ cat repro.s 0: .equ x, 1f - 0b ; jmp . + x ; 1:
$ llvm-mc -triple i386 repro.s -filetype=obj -o /dev/null
repro.s:5:9: error: invalid reassignment of non-absolute variable 'x' in '.equ' directive .equ x, 0xff ;
$ gcc -c repro.s $ echo $? 0
Fixed on Linux https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a780e485b5768e78aef087502499714901b68cc4