**Use case**

https://colab.research.google.com/drive/1wzYn59PA9EDyra6356a8rUpwd3zUX0Zt?usp=sharing

**Describe the solution you'd like**

There are multiple ways to prevent LD_PRELOAD:

- link statically with musl to prevent any chance for LD_PRELOAD working;
- add some flag to the binary like capabilities or setuid to also prevent LD_PRELOAD working;
- don't allow it with some env variable;
- implement our own dynamic loader.

Also possible workaround:

- check if LD_PRELOAD is set very early at program startup. If it is, reset it and exec ourself with the same argc, argv.
{
    struct sigaction sa{};
    struct sigaction sa_old{};
    sa.sa_sigaction = sigIllCheckHandler;
    sa.sa_flags = SA_SIGINFO;
    auto signal = SIGILL;
    if (sigemptyset(&sa.sa_mask) != 0
        || sigaddset(&sa.sa_mask, signal) != 0
        || sigaction(signal, &sa, &sa_old) != 0)
    {
        
        
        
        writeError("Can not set signal handler\n");
        _Exit(1);
    }
    volatile InstructionFail fail = InstructionFail::NONE;
    if (sigsetjmp(jmpbuf, 1))
    {
        writeError("Instruction check fail. The CPU does not support ");
        if (!std::apply(writeRetry, instructionFailToString(fail)))