History

Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm

Pull ARM updates from Russell King: - remove a now unnecessary usage of the KERNEL_DS for sys_oabi_epoll_ctl() - update my email address in a number of drivers - decompressor EFI updates from Ard Biesheuvel - module unwind section handling updates - sparsemem Kconfig cleanups - make act_mm macro respect THREAD_SIZE * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 8980/1: Allow either FLATMEM or SPARSEMEM on the multiplatform build ARM: 8979/1: Remove redundant ARCH_SPARSEMEM_DEFAULT setting ARM: 8978/1: mm: make act_mm() respect THREAD_SIZE ARM: decompressor: run decompressor in place if loaded via UEFI ARM: decompressor: move GOT into .data for EFI enabled builds ARM: decompressor: defer loading of the contents of the LC0 structure ARM: decompressor: split off _edata and stack base into separate object ARM: decompressor: move headroom variable out of LC0 ARM: 8976/1: module: allow arch overrides for .init section names ARM: 8975/1: module: fix handling of unwind init sections ARM: 8974/1: use SPARSMEM_STATIC when SPARSEMEM is enabled ARM: 8971/1: replace the sole use of a symbol with its definition ARM: 8969/1: decompressor: simplify libfdt builds Update rmk's email address in various drivers ARM: compat: remove KERNEL_DS usage in sys_oabi_epoll_ctl()

Linus Torvalds committed 6 years ago

Commit c2b0fc82 parents 533b220 fb597f224 files · +122 −170Browse files

Showing the changes to kernel/module.c (1 of 24 files). Show all

Unified · Split

kernel/module.c+7−2
@@ -2400,7 +2400,7 @@ static void layout_sections(struct module *mod, struct load_info *info) · 2399 unmodified lines
24002400 if ((s->sh_flags & masks[m][0]) != masks[m][0]
24012401 || (s->sh_flags & masks[m][1])
24022402 || s->sh_entsize != ~0UL
2403− || strstarts(sname, ".init"))
2403+ || module_init_section(sname))
24042404 continue;
24052405 s->sh_entsize = get_offset(mod, &mod->core_layout.size, s, i);
24062406 pr_debug("\t%s\n", sname);
@@ -2433,7 +2433,7 @@ static void layout_sections(struct module *mod, struct load_info *info) · 26 unmodified lines
24332433 if ((s->sh_flags & masks[m][0]) != masks[m][0]
24342434 || (s->sh_flags & masks[m][1])
24352435 || s->sh_entsize != ~0UL
2436− || !strstarts(sname, ".init"))
2436+ || !module_init_section(sname))
24372437 continue;
24382438 s->sh_entsize = (get_offset(mod, &mod->init_layout.size, s, i)
24392439 | INIT_OFFSET_MASK);
@@ -2768,6 +2768,11 @@ void * __weak module_alloc(unsigned long size) · 328 unmodified lines
27682768 return vmalloc_exec(size);
27692769 }
27702770
2771+bool __weak module_init_section(const char *name)
2772+{
2773+ return strstarts(name, ".init");
2774+}
2775+
27712776 bool __weak module_exit_section(const char *name)
27722777 {
27732778 return strstarts(name, ".exit");