I am looking for a way to change the gid of the dynamic linker while it is reading shared objects from the filesystem. For context, my goal is to create an environment where an unprivileged user can not read/analyze ELF files but can still execute them. This can be easily implemented for ELF executables (ie: chmod 0511), but not for ELF shared objects as they currently need read permissions to be linked. The solution I am investigating is to have the dynamic linker switch to a special group that has read permissions on all shared objects during the linking process. I tested utilizing the setgid bit on ld-elf.so.1, but this did not change the group of the linker at runtime. I have started looking for how the kernel handles the ELF PT_INTERP header field, but I have yet to find where the linker is actually executed. Could someone more familiar with the codebase point me to the right location?