[llvm] [Object] Parsing and dumping of SFrame FDEs (PR #149828)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 21 22:54:44 PDT 2025
================
@@ -0,0 +1,232 @@
+## Check parsing and dumping of SFrame Function Descriptor Entries.
+# RUN: yaml2obj --docnum=1 %s -o %t.1
+# RUN: llvm-readobj --sframe=.sframe_short --sframe=.sframe_section_relative \
+# RUN: --sframe=.sframe_fde_relative %t.1 2>&1 | \
+# RUN: FileCheck %s --strict-whitespace --match-full-lines \
+# RUN: -DFILE=%t.1 --check-prefix=CASE1
+
+## Check big-endian support.
+# RUN: yaml2obj --docnum=2 %s -o %t.2
+# RUN: llvm-readobj --sframe %t.2 2>&1 | \
+# RUN: FileCheck %s --strict-whitespace --match-full-lines \
+# RUN: -DFILE=%t.2 --check-prefix=CASE2
+
+--- !ELF
+FileHeader:
+ Class: ELFCLASS64
+ Data: ELFDATA2LSB
+ Type: ET_EXEC
+Sections:
+ - Name: .sframe_short
+ Type: SHT_GNU_SFRAME
+ Flags: [ SHF_ALLOC ]
+ ContentArray: [
+ 0xe2, 0xde, 0x02, 0x00, # Preamble (magic, version, flags)
----------------
MaskRay wrote:
(Aside: perhaps ContentArray should support raw hexadecimal bytes with whitespace ignored (e2de0200, or e2de 0200) https://llvm.org/docs/CommandGuide/llvm-mc.html#cmdoption-llvm-mc-hex
https://github.com/llvm/llvm-project/pull/149828
More information about the llvm-commits
mailing list