From: Mark Wielaard Date: Mon, 9 Feb 2026 22:18:40 +0000 (+0100) Subject: elflint, readelf, support SHT_LLVM_LTO and SHT_LLVM_ADDRSIG X-Git-Tag: elfutils-0.195~60 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ae7d8e1cd9493c07e89d1a6b9c24b23d7cc8d8a;p=thirdparty%2Felfutils.git elflint, readelf, support SHT_LLVM_LTO and SHT_LLVM_ADDRSIG An SHT_LLVM_LTO section contains LLVM bitcode. An SHT_LLVM_ADDRSIG section contains ULEB128 integers referring to the symbol table indexes of address-significant symbols. This patch just recognizes the SHT constants but doesn't handle the section contents. * libebl/eblsectiontypename.c (ebl_section_type_name): Recognize SHT_LLVM_ADDRSIG and SHT_LLVM_LTO. Signed-off-by: Mark Wielaard --- diff --git a/libebl/eblsectiontypename.c b/libebl/eblsectiontypename.c index ade25d4a..5b64a1e2 100644 --- a/libebl/eblsectiontypename.c +++ b/libebl/eblsectiontypename.c @@ -102,6 +102,22 @@ ebl_section_type_name (Ebl *ebl, int section, char *buf, size_t len) res = "GNU_ATTRIBUTES"; break; + /* A few LLVM additions. */ + +#ifndef SHT_LLVM_ADDRSIG +#define SHT_LLVM_ADDRSIG 0x6fff4c03 +#endif + case SHT_LLVM_ADDRSIG: + res = "LLVM_ADDRSIG"; + break; + +#ifndef SHT_LLVM_LTO +#define SHT_LLVM_LTO 0x6fff4c0c +#endif + case SHT_LLVM_LTO: + res = "LLVM_LTO"; + break; + default: /* Handle OS-specific section names. */ if (section >= SHT_LOOS && section <= SHT_HIOS)