[llvm] [AsmPrinter] Emit STT_OBJECT type and size for jump tables (PR #214170)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 5 10:50:47 PDT 2026


================
@@ -0,0 +1,58 @@
+; RUN: llc -mtriple=riscv32-elf -filetype=obj -code-model=small -verify-machineinstrs < %s \
+; RUN:   | llvm-objdump -t - \
+; RUN:   | FileCheck %s -check-prefixes=RV32I-SMALL
+; RUN: llc -mtriple=riscv32-elf -filetype=obj -code-model=medium -verify-machineinstrs < %s \
+; RUN:   | llvm-objdump -t - \
+; RUN:   | FileCheck %s -check-prefixes=RV32I-MEDIUM
+; RUN: llc -mtriple=riscv32-elf -filetype=obj -relocation-model=pic -verify-machineinstrs < %s \
+; RUN:   | llvm-objdump -t - \
+; RUN:   | FileCheck %s -check-prefixes=RV32I-PIC
+; RUN: llc -mtriple=riscv64-elf -filetype=obj -code-model=small -verify-machineinstrs < %s \
+; RUN:   | llvm-objdump -t - \
+; RUN:   | FileCheck %s -check-prefixes=RV64I-SMALL
+; RUN: llc -mtriple=riscv64-elf -filetype=obj -code-model=medium -verify-machineinstrs < %s \
+; RUN:   | llvm-objdump -t - \
+; RUN:   | FileCheck %s -check-prefixes=RV64I-MEDIUM
+; RUN: llc -mtriple=riscv64-elf -filetype=obj -relocation-model=pic -verify-machineinstrs < %s \
+; RUN:   | llvm-objdump -t - \
+; RUN:   | FileCheck %s -check-prefixes=RV64I-PIC
+
+
+define void @above_threshold(i32 signext %in, ptr %out) nounwind {
+; RV32I-SMALL:  {{[0-9a-f]+}} l     O .rodata        00000018 .LJTI0_0
----------------
MaskRay wrote:

Prefer llvm-readelf -s to llvm-objdump -t for symbol property checking. These `l` and `O` are BFD-mangled information.

https://github.com/llvm/llvm-project/pull/214170


More information about the llvm-commits mailing list