public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
* How can I wrap ld-linux or execve into it?
@ 2022-01-31 20:10 Farid Zakaria
  2022-01-31 20:29 ` Farid Zakaria
  2022-02-01 12:43 ` Adhemerval Zanella
  0 siblings, 2 replies; 5+ messages in thread
From: Farid Zakaria @ 2022-01-31 20:10 UTC (permalink / raw)
  To: libc-help

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-02-01 17:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-31 20:10 How can I wrap ld-linux or execve into it? Farid Zakaria
2022-01-31 20:29 ` Farid Zakaria
2022-02-01 12:43 ` Adhemerval Zanella
2022-02-01 17:14   ` Farid Zakaria
2022-02-01 17:49     ` Adhemerval Zanella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).