-
Notifications
You must be signed in to change notification settings - Fork 13.5k
LLVM's MCParser
does not understand .cfi_label
directives
#97222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Created #97922 to support In glibc, https://sourceware.org/PR23125 sysdeps/riscv/start.S utilizes .cfi_label to force
Technically,
I believe ARC, C-SKY, LoongArch just copy RISC-V without understanding the rationale :)
Use |
GNU assembler 2.26 introduced the .cfi_label directive. It does not expand to any CFI instructions, but defines a label in .eh_frame/.debug_frame, which can be used by runtime patching code to locate the FDE. .cfi_label is not allowed for CIE's initial instructions, and can therefore be used to force the next instruction to be placed in a FDE instead of a CIE. In glibc since 2018, sysdeps/riscv/start.S utilizes .cfi_label to force DW_CFA_undefined to be placed in a FDE. arc/csky/loongarch ports have copied this use. ``` .cfi_startproc // DW_CFA_undefined is allowed for CIE's initial instructions. // Without .cfi_label, gas would place DW_CFA_undefined in a CIE. .cfi_label .Ldummy .cfi_undefined ra .cfi_endproc ``` No CFI instruction is associated with .cfi_label, so the `case MCCFIInstruction::OpLabel:` code in BOLT is unreachable and onlt to make -Wswitch happy. Close llvm#97222 Pull Request: llvm#97922 Change-Id: Ic236d33bf52ac5631bd202c2896d23463c8e099b
This is currently a blocker for compiling glibc with Clang for ARC, C-SKY, LoongArch, and RISC-V, as these all make use of
.cfi_label
in theirstart.S
(example).The text was updated successfully, but these errors were encountered: