Linux??????????????
???????????? ???????[ 2015/11/13 11:41:03 ] ??????????????
?????????????
????????????????????????????????????????????????δ?????????
????gcc main.c -L./ -lelfhash
????./a.out
????//??п???г???
????//????????????
????./a.out: error while loading shared libraries: libelfhash.so: cannot open shared object file: No such file or directory
?????????????????????г????????????? ???????Щ?????????????-L???????Linux???????????е??SunOS????У????????????????????????Ч?? ???????????-l???????-lelfhash?????readelf -d a.out??????????????????????????????
????0x0000000000000001 (NEEDED) Shared library: [libelfhash.so]
????????????????沢??а?????????·???????????????????????????man ld-linux.so?????????????仰(?е???У??汾????)
????If a slash is found?? then the dependency string is interpreted as a (relative or absolute) pathname?? and the library is loaded using that pathname
??????λ?????????????????????????????????????/????????????????????????·??????????????????????????
????gcc main.c ./libelfhash.so
????./a.out
????23621492 //???????
????????readelf -d a.out???????????????????????·????
????0x0000000000000001 (NEEDED) Shared library: [./libelfhash.so]
????????????????????????????????е?·???????????????? ?????????????β??????????????????????????????????????е?????????????????????????????
????(??ELF???) ????????????DT_RPATH?????????????????DT_RUNPATH??????????????DT_RPATH???????Linux???????RPATH??RUNPATH????
??????????????LD_LIBRARY_PATH?????????????????set-user-id/set-group-id?? ???????
????(??ELF???) ????????????DT_RUNPATH?????????????
??????/etc/ld.so.cache????????в???
?????????·??/lib?? /usr/lib??????в???
???????????????RPATH????RUNPATH????????????
????gcc main.c -Wl??-rpath??/home/xxx??--enable-new-dtags -L./ -lelfhash
?????????-Wl????????????ld?????δ???????????????-rpath(???????-R)????ld??????·?????(???-Wl????????????????п??)????????--enable-new-dtags??????????RPATH???????RPATH??RUNPATH?????????á????readelf -d a.out?????:
????0x000000000000000f (RPATH) Library rpath: [/home/xxx]
????0x000000000000001d (RUNPATH) Library runpath: [/home/xxx]
?????????????????LD_LIBRARY_PATH?????????????? export
????export LD_LIBRARY_PATH=/home/xxx;$LD_LIBRARY_PATH
????RPATH??RUNPATH?????????·????????????????????????????LDLIBRARYPATH??????????????????????????????????У???????????????????????????????????????????????????????????????????? ???з???????????????????
??????????????????ldconfig???м????????????/etc/ld.so.conf.d/???′??????????????????????·??д???????????????????/lib??/lib64(64λ)??/usr/lib??/usr/lib64(64λ)???????sudo ldconfig???/etc/ld.so.cache?????
?????????汾
???????????????????????????????????а汾???????????????????/usr/lib64???????????????????????????±????????μ???汾?????
????gcc -fPIC -shared -Wall -Wl??-soname??libelfhash.so.0 -o libelfhash.so.0.0.0 elfhash.c
?????????????????????????????libelfhash.so.0.0.0????real name????????????????????libxxx.so.MAJOR.MINOR.VERSION(?е????VERSION?????)?????????????????????????????????????????????????MAJOR????????????????????????????bug??????MINOR??VERSION?????????MAJOR???????????????????????????????ò????????????????±??????г???
???????????????????ld???????????-soname??????????soname?? ???????libelfhash.so.0 ?????MAJOR??????г??????м???????????????????????????
????????????????????link name?????????г????????????????ld??????????????????а汾????.so??β????????? ??????????soname??????????
??????????????????????????????ldconfig????????libelfhash.so.0.0.0???/usr/lib64??????У???????????
????$sudo ldconfig -v | grep libelfhash.so
????libelfhash.so.0 -> libelfhash.so.0.0.0
???????????ldconfig????libelfhash.so.0.0.0????????????????soname???real name??????????????????(MINOR??VERSION????)??????????????λ????????sudo ldconfig?????????????????μ???????????????????
???????
????OK??????Linux?????????????????????Щ?????????Щ???????????漰???????????Щ?????????????á?????????????????????????ld??ld-linux.so??????????????????????????????????????????????????
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
Linux??????DDR????????????Linux?????????????????豸??????????linux???в???????????м??????????????????????????Linux????Linux??DNS????????????γ???????????Linux?????????????Linux????(???)????????Linux ????????????????????????????????Windows???У?Linux???????Linux????????????????Linux iommu??vfio???????Linux????ε???TCP???????Linux?????????????СLinux?·???????????Linux???Jexus?й?Asp.Net Core??ó???Linux?????????Щ??
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????