checking shared libraries for non default loaders

狂风中的少年 提交于 2019-12-03 07:45:23
geekosaur

Python, Perl, and other interpreted languages do load things dynamically using dlopen(). (This is not the same thing as replacing the standard loader; they are still using that, and in fact dlopen() is a hook into the standard loader on ELF-based systems.)

There is no standard registry for loadable modules. Python uses its own rules to determine where extension modules can be loaded from (look at sys.path), including those which have associated shared objects. Perl uses different rules. Apache uses still different rules, etc.

So to summarize the answers to your questions:

  1. not exactly

  2. no

As a side note, a possible way to accomplish what I wanted in question 2 would be to:

  • create an empty chrooted environment

  • recompile python in there, manually adding anything that is missing, one-by-one

Depending on your goals, this might or might not be a good solution (and actually turns out to be not too bad for what my goals are - strange as it may sound from the question)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!