LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 43795 - error: expected absolute expression
Summary: error: expected absolute expression
Status: RESOLVED FIXED
Alias: None
Product: libraries
Classification: Unclassified
Component: MC (show other bugs)
Version: trunk
Hardware: PC Linux
: P enhancement
Assignee: Jian Cai
URL: https://github.com/ClangBuiltLinux/li...
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-24 15:04 PDT by Jian Cai
Modified: 2020-12-17 17:04 PST (History)
1 user (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jian Cai 2019-10-24 15:04:50 PDT
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.
Comment 1 Jian Cai 2019-10-24 15:06:22 PDT
https://reviews.llvm.org/D69411
Comment 4 Jian Cai 2020-01-27 15:43:22 PST
Please ignore my last comment. It was supposed to be for a different bug.
Comment 5 Jian Cai 2020-12-17 17:04:54 PST
https://reviews.llvm.org/D69411 accepted and merged.