What is the LD_PRELOAD trick?

前端 未结 9 1167
攒了一身酷
攒了一身酷 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: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.

提交回复
热议问题