I need to modify the ELF loader's kernel implementation of an Ubuntu 14.04 distribution. Having downloaded the sources using:sudo apt-get source linux-image-$(uname -r)I ran the configuration script:make configin the root source tree. After a seemingly endless sequence of input requests, the script created the .config file needed to build the kernel (or a set of modules). The kernel version that I am using is linux-3.13.0, and it has the following source tree layout:$ ls arch              Documentation      fs          kernel          README             soundblock             drivers            include     lib             REPORTING-BUGS     toolsCOPYING           dropped.txt        init        MAINTAINERS     samples            ubuntuCREDITS           elf.dat            ipc         Makefile        scripts            usrcrypto            FileSystemMake     Kbuild      mm              security           virtdebian.master     firmware           Kconfig     net             shortcutsThe ELF loader is located in /path/to/source/fs/binfmt_elf.c. Following this question, in order to compile an individual module it is sufficient to runmake /path/to/module/directoryIn this case that would be:make /path/to/source/fsThe compilation is quite lengthy; it takes about twenty minutes (on a virtual machine) and the output is written (by default) in the same directory in which the module is located. I've found the object files by running:find . -name *.oin /path/to/source/fs. Filtering by name, the ELF loader can be located by running:find . -name *elf*.oIn the current sources it is written (by default) in:/path/to/source/fs/binfmt_elf.oHaving gone through this tutorial, I've noticed that kernel modules have the naming convention module_name.ko in order to distinguish them from user space object files. How can I insert the new (modified) ELF loader into the kernel, given that the current ELF loader is present (and unloading it may prevent binaries from being executed)?
How to insert a modified ELF loader given the current ELF loader is present?
linux kernel;compiling;kernel modules