Hi Navin, On Fri, 2020-11-13 at 20:45 +0530, Navin P via Elfutils-devel wrote: > make elflint ignore it rather error as unsupported type. Other tools > like > readelf , objdump understand this section.
Is there a specification of this section type? diff --git a/libelf/elf.h b/libelf/elf.h > index 6439c1a4..26420b45 100644 > --- a/libelf/elf.h > +++ b/libelf/elf.h > @@ -444,6 +444,7 @@ typedef struct > #define SHT_SYMTAB_SHNDX 18 /* Extended section indeces */ > #define SHT_NUM 19 /* Number of defined types. */ > #define SHT_LOOS 0x60000000 /* Start OS-specific. */ > +#define SHT_LLVM_ADDRSIG 0x6FFF4C03 /* llvm address sig */ > #define SHT_GNU_ATTRIBUTES 0x6ffffff5 /* Object attributes. */ > #define SHT_GNU_HASH 0x6ffffff6 /* GNU-style hash table. */ > #define SHT_GNU_LIBLIST 0x6ffffff7 /* Prelink library list */ elf.h comes from the glibc project. We should first try to upstream new constants there (glibc-al...@sourceware.org) > diff --git a/src/elflint.c b/src/elflint.c > index ef3e3732..62663800 100644 > --- a/src/elflint.c > +++ b/src/elflint.c > @@ -3905,6 +3905,7 @@ section [%2zu] '%s': size not multiple of entry > size\n"), > && shdr->sh_type != SHT_GNU_ATTRIBUTES > && shdr->sh_type != SHT_GNU_LIBLIST > && shdr->sh_type != SHT_CHECKSUM > + && shdr->sh_type != SHT_LLVM_ADDRSIG > && shdr->sh_type != SHT_GNU_verdef > && shdr->sh_type != SHT_GNU_verneed > && shdr->sh_type != SHT_GNU_versym Note that for various of these SHT_GNU extensions we actually do have some extra checks. Do we need to check anything for a section marked SHT_LLVM_ADDRSIG? Thanks, Mark