Strictly speaking SHF_EXCLUDE is a processor specific section flag,
but it is used generically in the GNU toolchain. For example when
adding .gnu.lto_ sections.
Signed-off-by: Mark Wielaard <mark@klomp.org>
+2020-04-16 Mark Wielaard <mark@klomp.org>
+
+ * elflint.c (check_sections): Mask out SHF_EXCLUDE from processor
+ specific section flags when --gnu is given.
+
2020-02-08 Mark Wielaard <mark@klomp.org>
* elflint.c (check_program_header): Handle PT_GNU_PROPERTY.
GElf_Xword sh_flags = shdr->sh_flags & ~(GElf_Xword) ALL_SH_FLAGS;
if (sh_flags & SHF_MASKPROC)
{
+ /* Strictly speaking SHF_EXCLUDE is a processor specific
+ section flag, but it is used generically in the GNU
+ toolchain. */
+ if (gnuld)
+ sh_flags &= ~(GElf_Xword) SHF_EXCLUDE;
if (!ebl_machine_section_flag_check (ebl,
sh_flags & SHF_MASKPROC))
ERROR (gettext ("section [%2zu] '%s'"