[llvm] [llvm][ELF] Add ELF section type for embedding ELF binaries (PR #207027)

Andrew Ng via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 3 02:37:28 PDT 2026


================
@@ -1196,6 +1196,7 @@ enum : unsigned {
   SHT_LLVM_JT_SIZES = 0x6fff4c0d,           // LLVM jump tables sizes.
   SHT_LLVM_CFI_JUMP_TABLE = 0x6fff4c0e,     // LLVM CFI jump table.
   SHT_LLVM_CALL_GRAPH = 0x6fff4c0f,         // LLVM Call Graph Section.
+  SHT_LLVM_ELF = 0x6fff4c10,                // LLVM ELF.
----------------
nga888 wrote:

I've actually deliberately kept it "generic", somewhat like `SHT_PROGBITS`. Therefore, it's the "use" of it that will determine the "semantics" and processing, as I've mentioned in the documentation. There is the option of going in the other direction and making it very specific to dynamic debugging, if that's preferred.

The terminology (as normal) is tricky. You could argue that adding `EMBEDDED` might also add confusion, i.e. is this a "normal" ELF or something "special". Would `SHT_LLVM_ELF_BINARY` be any better?

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


More information about the llvm-commits mailing list