linker loading in kernel side
Hello folks. I am working on encryption of binary files of ELF format. For this purpose, I am going to encrypt "linker" binary and it will be decrypted in kernel side before getting loaded into memory. My plan is to decrypt the contents of the linker once it gets loaded into memory.
I thought of adding the decryption code in "load_elf_interp" function of "kernel\fs\binfmt_elf.c" file. There is one "elf_map" call in that function which returns "map_addr". I thought that "map_addr" is the start address in memory from where linker is loaded. But when I printed the contents starting from location "map_addr", it does not match with the contents present in linker binary.
Is this the correct place where the linker gets loaded into memory? If not, please guide me in this regard.
Thanks in advance.