What is the LD_PRELOAD trick?

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

    it's easy to export mylib.so to env:

    $ export LD_PRELOAD=/path/mylib.so
    $ ./mybin
    

    to disable :

    $ export LD_PRELOAD=
    

提交回复
热议问题