What is the LD_PRELOAD trick?

前端 未结 9 1161
攒了一身酷
攒了一身酷 2020-11-21 07:27

I came across a reference to it recently on proggit and (as of now) it is not explained.

I suspect this might be it, but I don\'t know for sure.

相关标签:
9条回答
  • 2020-11-21 08:11

    when LD_PRELOAD is used that file will be loaded before any other $export LD_PRELOAD=/path/lib lib to be pre loaded, even this can be used in programs too

    0 讨论(0)
  • 2020-11-21 08:12

    Here is a detailed blog post about preloading:

    https://blog.cryptomilk.org/2014/07/21/what-is-preloading/

    0 讨论(0)
  • 2020-11-21 08:15

    You can override symbols in the stock libraries by creating a library with the same symbols and specifying the library in LD_PRELOAD.

    Some people use it to specify libraries in nonstandard locations, but LD_LIBRARY_PATH is better for that purpose.

    0 讨论(0)
提交回复
热议问题