geteilt von: https://lemmy.ml/post/38099727

(translated) According to my statistics, the vast majority of my visitors use a Unix-like or Unix operating system. What do these OSs have in common? They all have their own preloader, which is used to load shared libraries.

Use the translator in the sidebar to translate the page.

  • just_another_person@lemmy.world
    link
    fedilink
    arrow-up
    3
    arrow-down
    4
    ·
    7 days ago

    It’s an environment variable…

    Does this warrant and entire novel about it if you’re working within external source builds? No.

    In fact, I think you’d be better off writing a deep dive into what/how environment variables work at build time, and also invoking commands on the CLI.

    • Markaos@discuss.tchncs.de
      link
      fedilink
      arrow-up
      5
      ·
      5 days ago

      In fact, I think you’d be better off writing a deep dive into what/how environment variables work at build time, and also invoking commands on the CLI.

      But LD_PRELOAD doesn’t really have much to do with build time behavior (unless you’re talking about replacing parts of the compiler) - it allows you to force a shared library to be loaded with higher priority than anything else, so it overrides symbols from other libraries.

      It is recognized and used by Linux’s dynamic linker, which is run-time, not build-time.