summaryrefslogtreecommitdiffstats
path: root/src/elflint.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/elflint.c')
-rw-r--r--src/elflint.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/elflint.c b/src/elflint.c
index e8787d01..37936b1f 100644
--- a/src/elflint.c
+++ b/src/elflint.c
@@ -2461,6 +2461,9 @@ section [%2d] '%s' is contained in more than one section group\n"),
static const char *
section_flags_string (GElf_Word flags, char *buf, size_t len)
{
+ if (flags == 0)
+ return "none";
+
static const struct
{
GElf_Word flag;
@@ -3102,7 +3105,7 @@ static const struct
{ ".init_array", 12, SHT_INIT_ARRAY, exact, SHF_ALLOC | SHF_WRITE, 0 },
{ ".interp", 8, SHT_PROGBITS, atleast, 0, SHF_ALLOC }, // XXX more tests?
{ ".line", 6, SHT_PROGBITS, exact, 0, 0 },
- { ".note", 6, SHT_NOTE, exact, 0, 0 },
+ { ".note", 6, SHT_NOTE, atleast, 0, SHF_ALLOC },
{ ".plt", 5, SHT_PROGBITS, unused, 0, 0 }, // XXX more tests
{ ".preinit_array", 15, SHT_PREINIT_ARRAY, exact, SHF_ALLOC | SHF_WRITE, 0 },
{ ".rela", 5, SHT_RELA, atleast, 0, SHF_ALLOC }, // XXX more tests
@@ -3700,6 +3703,12 @@ phdr[%d]: unknown core file note type %" PRIu64 " at offset %" PRIu64 "\n"),
/* Known type. */
break;
+ case 0:
+ /* Linux vDSOs use a type 0 note for the kernel version word. */
+ if (namesz == sizeof "Linux"
+ && !memcmp (notemem + idx + 3 * align, "Linux", sizeof "Linux"))
+ break;
+
default:
ERROR (gettext ("\
phdr[%d]: unknown object file note type %" PRIu64 " at offset %" PRIu64 "\n"),