How can I wrap ld-linux or execve into it?
Farid Zakaria
fmzakari@ucsc.edu
Mon Jan 31 20:29:21 GMT 2022
Adding some more context based on some private responses:
My goal is to explore some potential changes as part of a PhD thesis
to control dynamic linking.
I have explored modifying glibc/musl but I was exploring an execve approach to:
1. make the change libc agnostic
2. restrict my changes to a smaller codebase for the purpose of the exploration
On Mon, Jan 31, 2022 at 12:10 PM Farid Zakaria <fmzakari@ucsc.edu> wrote:
>
> Hi,
>
> I am looking to perform some functionality before the dynamic linker
> (linux-ld/ld.so) is invoked.
>
> My naive assessment was that I would be able to set in the PT_INTERP
> section of a binary, my *static binary*, which will then execve into
> the dynamic linker after doing some precanned actions.
>
> Unfortunately, trying this has resulted in some SIGSEGV...
>
> I came across https://github.com/Mic92/nix-ld which seems to do
> something similar, but I was curious why it has to do a lot more to
> achieve the same effect with a jump.
>
> I have also been pointed to LD_AUDIT however I am also interested in
> having it agnostic to libc (glibc vs. musl)
>
> Thank you for any tips, guidance or links you can provide.
> FZ
More information about the Libc-help
mailing list