binfmt_elf as module
PATCH 1/1 binfmt_elf as module
Someone reported binfmt_elf.o wouldn't load because of unresolved symbols, but didn't report the symbols that were missing (I seem to have deleted the original mail.)
Turns out it is empty_zero_page and get_user_pages that are missing. Probably been broken for ages, as binfmt_elf is compiled in for 99.9% of folks of course.
Patch for i386 against 2.4.17 follows. Other arch may also still be broken, depending on their definition of ZERO_PAGE and whether or not it uses empty_zero_page.
Paul.
Makefile renamed from Makefile~ +1 -1
@@ -9,7 +9,7 @@ O_TARGET := mm.o -export-objs := shmem.o filemap.o +export-objs := shmem.o filemap.o memory.o obj-y := memory.o mmap.o filemap.o mprotect.o mlock.o mremap.o \ vmalloc.o slab.o bootmem.o swap.o vmscan.o page_io.o \
i386/kernel/i386_ksyms.c renamed from i386/kernel/i386_ksyms.c~ +1 -0
@@ -71,6 +71,7 @@EXPORT_SYMBOL (get_cmos_time);EXPORT_SYMBOL (apm_info);EXPORT_SYMBOL (gdt); +EXPORT_SYMBOL (empty_zero_page);#ifdef CONFIG_DEBUG_IOVIRT EXPORT_SYMBOL (__io_virt_debug);
memory.c renamed from memory.c~ +3 -0
@@ -44,6 +44,7 @@#include <linux/iobuf.h> #include <linux/highmem.h> #include <linux/pagemap.h> +#include <linux/module.h> #include <asm/pgalloc.h> #include <asm/uaccess.h>
@@ -499,6 +500,8 @@ }while (len);return i; } + +EXPORT_SYMBOL (get_user_pages);/* * Force in an entire range of pages from the current process's user VA,