dlopendlopen
这个跟你一样的,有何用意?
看看你的Linux系统上dlopen的具体实现。
dlopen()
Thefunctiondlopen()loadsthedynamiclibraryfilenamedbythenull-terminatedstringfilenameandreturnsanopaque
"handle"forthedynamiclibrary.IffilenameisNULL,thenthereturnedhandleisforthemainprogram.Iffilenamecon‐

tainsaslash("/"),thenitisinterpretedasa(relativeorabsolute)pathname.Otherwise,thedynamiclinkersearches
forthelibraryasfollows(seeld.so(8)forfurtherdetails):
o(ELFonly)IftheexecutablefileforthecallingprogramcontainsaDT_RPATHtag,anddoesnotcontainaDT_RUNPATH
tag,thenthedirectorieslistedintheDT_RPATHtagaresearched.
oIf,atthetimethattheprogramwasstarted,theenvironmentvariableLD_LIBRARY_PATHwasdefinedtocontainacolon-
separatedlistofdirectories,thenthesearesearched.(Asasecuritymeasurethisvariableisignoredforset-user-
IDandset-group-IDprograms.)
o(ELFonly)IftheexecutablefileforthecallingprogramcontainsaDT_RUNPATHtag,thenthedirectorieslistedin
thattagaresearched.
oThecachefile/etc/ld.so.cache(maintainedbyldconfig(8))ischeckedtoseewhetheritcontainsanentryforfile‐
name.
oThedirectories/liband/usr/libaresearched(inthatorder).
本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/jisuanjixue/article-38539-1.html
本来存银行1年能得10万*1
比濒海战斗舰强百倍