The map_object.c change fixes the AT_EXECFD functionality, which is the prerequisite for the main part of the patch. If the mapped object is linked at specific address, we must obey it. Before, only in-kernel ELF image activator needed to keep the mapping address, since only binaries are linked at the fixed address, and binaries were always mapped by kernel.
For rtld.c bits, check if passed phdr is actually phdr of the interpreter itself, and decide that this is the case of direct execution. In this case, the binary to activate is specified in the argv. After opening it, shift down on-stack structure with argv, env and aux vectors to emulate execution of the binary and not of the interpreter.
Right now, the calculation of execpath in the direct execution mode is too naive, it affects $ORIGIN. Might be, ld-elf.so.1 should search the binary in $PATH, but I am not sure. Anyway, this patch is a good initial step, I believe.