@@ -341,6 +341,11 @@ int module_frob_arch_sections(CONST Elf_Ehdr *hdr,
".PARISC.unwind", 14) == 0)
me->arch.unwind_section = i;
+ /* we produce multiple, empty .text sections, and kallsyms
+ * gets upset. make non-alloc so it doesn't see them. */
+ if (sechdrs[i].sh_size == 0)
+ sechdrs[i].sh_flags &= ~SHF_ALLOC;
+
if (sechdrs[i].sh_type != SHT_RELA)
continue;
@@ -1316,7 +1316,7 @@ resolve_symbol_wait(struct module *mod,
#ifdef CONFIG_KALLSYMS
static inline bool sect_empty(const Elf_Shdr *sect)
{
- return !(sect->sh_flags & SHF_ALLOC) || sect->sh_size == 0;
+ return !(sect->sh_flags & SHF_ALLOC);
}
struct module_sect_attr