rpath=$ORIGIN not having desired effect?

后端 未结 3 588
迷失自我
迷失自我 2020-12-13 10:18

I\'ve got a binary \"CeeloPartyServer\" that needs to find libFoundation.so at runtime, on a FreeBSD machine. They\'re both in the same directory. I compile (on another pl

3条回答
  •  Happy的楠姐
    2020-12-13 10:23

    Depending on how many layers this flag passes through before the linker sees it, you may need to use $$ORIGIN or even \$$ORIGIN. You will know that you have it right when readelf shows an RPATH header that looks like $ORIGIN/../lib or similar. The extra $ and the backslash are just to prevent the $ from being processed by other tools in the chain.

提交回复
热议问题