public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] define SHT_LLVM_ADDRSIG section rather than error out
@ 2020-11-13 15:15 Navin P
  2020-11-17 14:19 ` Mark Wielaard
  0 siblings, 1 reply; 7+ messages in thread
From: Navin P @ 2020-11-13 15:15 UTC (permalink / raw)
  To: elfutils-devel

 make elflint ignore it rather error as unsupported type. Other tools like
 readelf , objdump understand this section.

Signed-off-by: Navin P <navinp0304@gmail.com>
---
 libelf/elf.h  | 1 +
 src/elflint.c | 1 +
 2 files changed, 2 insertions(+)

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 */
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
-- 
2.25.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-03-09  7:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-13 15:15 [PATCH] define SHT_LLVM_ADDRSIG section rather than error out Navin P
2020-11-17 14:19 ` Mark Wielaard
2020-11-18  5:34   ` Navin P
2021-03-04 13:44     ` Timm Bäder
2021-03-04 13:59       ` Mark Wielaard
2021-03-09  7:40         ` Timm Bäder
2021-03-04 14:00       ` Navin P

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).