How to resolve duplicate symbol link static library

Submitted by lepton on Fri, 05/20/2016 - 11:35

Tags

首先从静态库中解压 .o 文件

ar -x lib.a

nm查看符号表  找到重复的函数符号名

nm a.o

c和c++的符号表不一样

0000000000000000 T __Z4testv //c++

0000000000000000 T test //c

 

隐藏符号 相当于加 static

ld -r a.o -unexported_symbol  __Z4testv -o c.o; rm a.o; mv c.o a.o //mac 下可使用

objcopy --localize-symbol=_Z4testv a.o
 

修改符号名称

ld -r a.o -alias __Z4testv test_c  -unexported_symbol  __Z4testv -o c.o //mac 下可使用

objcopy --redefine-sym _Z4testv=test_a a.o

如果其他 .o文件引用了这个函数 对每一个文件都要执行

find ./ -name "*.o" -exec objcopy --redefine-sym _Z4testv=test_a {} \;

 

可以给所有函数加前缀
c语言可以 函数改名变成foo_test
c++因为引入了很多系统函数 只能用上面的方法一个一个该

objcopy --prefix-symbols=foo_ a.o

重新生成静态库

ar crs lib.a *.o

Comments

avemuxewjan (not verified)

Mon, 05/27/2024 - 04:10

Wood's ataxia; [URL=https://castleffrench.com/allural/ - allural[/URL - allural [URL=https://heavenlyhappyhour.com/generic-prednisone-from-canada/ - cheap prednisone[/URL - [URL=https://mrindiagrocers.com/albenda/ - albenda[/URL - [URL=https://miaseilern.com/product/alerzina/ - alerzina.com[/URL - [URL=https://charlotteelliottinc.com/prednisone/ - no prescription prednisone[/URL - [URL=https://pureelegance-decor.com/pill/aluline/ - aluline[/URL - [URL=https://helpo.org/alzim/ - alzim[/URL - [URL=https://profitplusfinancial.com/item/amlorus/ - amlorus 10mg[/URL - amlorus [URL=https://miaseilern.com/product/adana/ - adana sells online[/URL - [URL=https://mrindiagrocers.com/drugs/acellin/ - prices for acellin[/URL - [URL=https://sjsbrookfield.org/monuvir/ - monuvir[/URL - generic monuvir [URL=https://center4family.com/canadian-pharmacy-online/ - pharmacy[/URL - [URL=https://a1sewcraft.com/cialis-10-mg/ - discount cialis prescriptions[/URL - [URL=https://markssmokeshop.com/adaferin/ - adaferin buy in canada[/URL - [URL=https://myhealthincheck.com/drug/acetaminofn/ - acetaminofn english[/URL - [URL=https://tonysflowerstucson.com/fildena/ - purchase fildena without a prescription[/URL - [URL=https://nikonphotorecovery.com/absenor/ - buy absenor online canada[/URL - [URL=https://mrindiagrocers.com/acetalis/ - acetalis.com[/URL - [URL=https://shecanmagazine.com/item/amben/ - cefadroxil[/URL - amben tablets [URL=https://karachigo.com/amifen/ - amifen overnight fedex[/URL - [URL=https://teenabortionissues.com/drugs/cernos-caps/ - cernos caps capsules[/URL - [URL=https://mrindiagrocers.com/almadin/ - almadin[/URL - [URL=https://americanazachary.com/cenforce/ - retail prices for cenforce[/URL - [URL=https://miaseilern.com/product/als-selegilina/ - als selegilina[/URL - [URL=https://umichicago.com/drugs/flomax/ - flomax best price[/URL - [URL=https://markssmokeshop.com/drugs/acitop/ - acitop 800mg[/URL - [URL=https://chicagosfinestccl.com/allertec/ - lowest price on generic allertec[/URL - [URL=https://markssmokeshop.com/drugs/actifuge/ - actifuge[/URL - [URL=https://frankfortamerican.com/tadalafil-20mg/ - tadalafil[/URL - [URL=https://mrindiagrocers.com/aciclomed/ - aciclomed[/URL - trisomy-21, lowest allural prices online prednisone no prescription albenda zyrtec prednisone without a prescription aluline 300mg alzim usa rx amlorus cheapest adana online in the uk www.acellin.com monuvir no prescription pharmacy cialis us adaferin non prescription acetaminofn purchase fildena without a prescription buy absenor online acetalis 525mg cefadroxil amifen uk order buy cernos caps online cheap buy almadin without prescription cenforce 100 als selegilina no prescription flomax buy acitop online allertec tablets for sale actifuge 400mg centres de traduction sp cialis s aciclomed 200mg good, unwanted choice https://castleffrench.com/allural/ https://heavenlyhappyhour.com/generic-prednisone-from-canada/ https://mrindiagrocers.com/albenda/ https://miaseilern.com/product/alerzina/ https://charlotteelliottinc.com/prednisone/ https://pureelegance-decor.com/pill/aluline/ generic aluline from india https://helpo.org/alzim/ https://profitplusfinancial.com/item/amlorus/ https://miaseilern.com/product/adana/ https://mrindiagrocers.com/drugs/acellin/ https://sjsbrookfield.org/monuvir/ https://center4family.com/canadian-pharmacy-online/ https://a1sewcraft.com/cialis-10-mg/ tadalafil https://markssmokeshop.com/adaferin/ https://myhealthincheck.com/drug/acetaminofn/ https://tonysflowerstucson.com/fildena/ https://nikonphotorecovery.com/absenor/ https://mrindiagrocers.com/acetalis/ generic acetalis from canada https://shecanmagazine.com/item/amben/ https://karachigo.com/amifen/ https://teenabortionissues.com/drugs/cernos-caps/ https://mrindiagrocers.com/almadin/ https://americanazachary.com/cenforce/ cenforce https://miaseilern.com/product/als-selegilina/ https://umichicago.com/drugs/flomax/ https://markssmokeshop.com/drugs/acitop/ https://chicagosfinestccl.com/allertec/ https://markssmokeshop.com/drugs/actifuge/ https://frankfortamerican.com/tadalafil-20mg/ https://mrindiagrocers.com/aciclomed/ oesophagitis, distorts mobility.

owapekorseze (not verified)

Mon, 05/27/2024 - 04:12

Fibroids, knot, fetus meconium [URL=https://nikonphotorecovery.com/pill/amarance/ - non prescription amarance[/URL - [URL=https://castleffrench.com/amilavil/ - amilavil[/URL - [URL=https://tonysflowerstucson.com/algifor-l/ - generic algifor-l mastercard accepted[/URL - [URL=https://frankfortamerican.com/prednisone-without-rx/ - prednisone for sale online no perscription[/URL - [URL=https://pureelegance-decor.com/altosec/ - prilosec[/URL - [URL=https://pureelegance-decor.com/aciban-dsr/ - discount aciban dsr[/URL - [URL=https://mrindiagrocers.com/drugs/aloral/ - aloral[/URL - [URL=https://nikonphotorecovery.com/acercomp/ - acercomp[/URL - [URL=https://ad-visorads.com/pill/aldazide/ - order aldazide[/URL - [URL=https://mrindiagrocers.com/agisten/ - agisten 100mg[/URL - [URL=https://markssmokeshop.com/drugs/acitop/ - buy acitop online[/URL - [URL=https://nwfgenealogy.com/akorazol/ - buying akorazol online[/URL - [URL=https://cassandraplummer.com/item/aldazida/ - cheapest aldazida[/URL - [URL=https://columbiainnastoria.com/drugs/generic-lasix-canada/ - lowest price lasix[/URL - lasix without dr prescription usa [URL=https://miaseilern.com/product/acide-fusidique/ - acide fusidique coupon[/URL - [URL=https://transylvaniacare.org/staxyn/ - lowest price for staxyn[/URL - [URL=https://livinlifepc.com/drugs/hydroxychloroquine/ - hydroxychloroquine online canada[/URL - [URL=https://pureelegance-decor.com/pill/adex/ - adex 400mg[/URL - [URL=https://tonysflowerstucson.com/adglim/ - adglim tablets[/URL - [URL=https://yourbirthexperience.com/viagra/ - viagra[/URL - [URL=https://karachigo.com/product/acalix/ - overnight acalix[/URL - [URL=https://successsummaries.net/aersolin-d/ - aersolin d capsules for sale[/URL - [URL=https://miaseilern.com/alergan/ - kosten alergan[/URL - [URL=https://ad-visorads.com/pill/allergica/ - cheapest allergica[/URL - allergica [URL=https://helpo.org/ambilan/ - ambilan for sale[/URL - [URL=https://profitplusfinancial.com/item/aclav/ - aclav price hong kong[/URL - buy aclav online canada [URL=https://helpo.org/alverix/ - alverix 45mg[/URL - [URL=https://chicagosfinestccl.com/albenzol/ - rx health drugs albenzol[/URL - [URL=https://miaseilern.com/product/als-selegilina/ - als selegilina[/URL - als selegilina [URL=https://nikonphotorecovery.com/alozur/ - alozur capsules for sale[/URL - cardiac non prescription amarance amilavil without pres algifor-l online pharmacy uk prednisone.com prednisone without rx generic altosec online discount aciban dsr cheap generic aloral without prescription aloral acercomp acercomp price at walmart aldazide swiss agisten generic acitop at walmart buy acitop buying akorazol online canadian pharmacy aldazida brand lasix real lasix paypal acide fusidique lowest price for staxyn on line hydroxychloroquine adex adglim generic viagra overnite no perscription www.acalix.com pharmacy prices for aersolin d alergan cialis uk lowest price generic allergica ambilan 1000mg on aclav line www.alverix.com albenzol 400mg als selegilina alozur generico precio stated congestive same- https://nikonphotorecovery.com/pill/amarance/ https://castleffrench.com/amilavil/ https://tonysflowerstucson.com/algifor-l/ https://frankfortamerican.com/prednisone-without-rx/ https://pureelegance-decor.com/altosec/ https://pureelegance-decor.com/aciban-dsr/ https://mrindiagrocers.com/drugs/aloral/ https://nikonphotorecovery.com/acercomp/ https://ad-visorads.com/pill/aldazide/ https://mrindiagrocers.com/agisten/ compra agisten https://markssmokeshop.com/drugs/acitop/ https://nwfgenealogy.com/akorazol/ https://cassandraplummer.com/item/aldazida/ https://columbiainnastoria.com/drugs/generic-lasix-canada/ https://miaseilern.com/product/acide-fusidique/ https://transylvaniacare.org/staxyn/ https://livinlifepc.com/drugs/hydroxychloroquine/ https://pureelegance-decor.com/pill/adex/ https://tonysflowerstucson.com/adglim/ https://yourbirthexperience.com/viagra/ https://karachigo.com/product/acalix/ https://successsummaries.net/aersolin-d/ pharmacy prices for aersolin d https://miaseilern.com/alergan/ https://ad-visorads.com/pill/allergica/ https://helpo.org/ambilan/ ambilan https://profitplusfinancial.com/item/aclav/ https://helpo.org/alverix/ https://chicagosfinestccl.com/albenzol/ https://miaseilern.com/product/als-selegilina/ https://nikonphotorecovery.com/alozur/ devolved score non-cirrhotic introduced.

qovaxezl (not verified)

Mon, 05/27/2024 - 04:12

Proximal excision, elongated [URL=https://nwfgenealogy.com/alcophobin/ - alcophobin buy in canada[/URL - alcophobin [URL=https://miaseilern.com/product/aldinir/ - generic aldinir cheap free shipping[/URL - [URL=https://miaseilern.com/acetamin/ - acetamin canadian pharmacy[/URL - [URL=https://damcf.org/drug/kamagra/ - kamagra pricing[/URL - [URL=https://markssmokeshop.com/amazina/ - amazina[/URL - [URL=https://karachigo.com/product/adol/ - adol online[/URL - [URL=https://ad-visorads.com/albipenal/ - generic albipenal paypal accepted[/URL - [URL=https://damcf.org/xenical/ - el xenical[/URL - [URL=https://nikonphotorecovery.com/alozur/ - canada pharmacy alozur[/URL - [URL=https://ad-visorads.com/pill/albex/ - albex capsules[/URL - [URL=https://helpo.org/acertol/ - generic acertol tablets[/URL - [URL=https://profitplusfinancial.com/item/afiancen/ - afiancen[/URL - [URL=https://chicagosfinestccl.com/afloyan/ - afloyan cost prescription[/URL - afloyan from costa rica [URL=https://transylvaniacare.org/pill/erectafil/ - generic erectafil dosage[/URL - [URL=https://pureelegance-decor.com/pill/adtzimaia/ - adtzimaia generic pills[/URL - [URL=https://tnterra.org/item/afixime/ - afixime overnight[/URL - [URL=https://ghspubs.org/item/amoxicillin/ - lowest amoxicillin prices[/URL - [URL=https://karachigo.com/allo-puren/ - allo-puren originale farmacia online[/URL - [URL=https://cassandraplummer.com/item/alemoxan/ - how to buy cheap generic alemoxan[/URL - [URL=https://heavenlyhappyhour.com/tadalafil-en-ligne/ - tadalafil online canada[/URL - tadalafil no prescription [URL=https://pureelegance-decor.com/pill/adex/ - adex uk[/URL - [URL=https://karachigo.com/acretin/ - acretin order online discount[/URL - acretin 20gm [URL=https://pureelegance-decor.com/aciban-dsr/ - aciban dsr[/URL - [URL=https://castleffrench.com/item/acnetrin/ - acnetrin[/URL - [URL=https://frankfortamerican.com/cialis-black/ - buy cialis black without prescription[/URL - [URL=https://helpo.org/adrexan/ - pharmacy prices for adrexan[/URL - [URL=https://columbiainnastoria.com/lasix/ - lasix buy online overnight ship[/URL - [URL=https://endmedicaldebt.com/drug/vidalista/ - vidalista brand[/URL - [URL=https://profitplusfinancial.com/item/amarin/ - amarin[/URL - amarin 30mg [URL=https://ad-visorads.com/pill/amertil/ - amertil 5mg[/URL - raise oophorectomy alcophobin venta de aldinir generico prices for acetamin discount kamagra canada zyrtec adol online generic albipenal tablets albipenal alli orlistat best price alozur 10mg buying albex online acertol afiancen on line sales afloyan commercial london afloyan erectafil pills adtzimaia afixime on line amoxicillin online canada allo puren.com clozaril tadalafil en ligne remplace le tadalafil adex ordering acretin online without prescription aciban dsr acnetrin lowest price cialis black adrexan price at walmart lasix on internet vidalista from canada amarin generique en france buy generic amertil functioning, lifethreatening https://nwfgenealogy.com/alcophobin/ https://miaseilern.com/product/aldinir/ https://miaseilern.com/acetamin/ https://damcf.org/drug/kamagra/ https://markssmokeshop.com/amazina/ https://karachigo.com/product/adol/ https://ad-visorads.com/albipenal/ https://damcf.org/xenical/ https://nikonphotorecovery.com/alozur/ https://ad-visorads.com/pill/albex/ https://helpo.org/acertol/ https://profitplusfinancial.com/item/afiancen/ afiancen without a prescription https://chicagosfinestccl.com/afloyan/ https://transylvaniacare.org/pill/erectafil/ https://pureelegance-decor.com/pill/adtzimaia/ https://tnterra.org/item/afixime/ https://ghspubs.org/item/amoxicillin/ https://karachigo.com/allo-puren/ allo puren online pharmacy https://cassandraplummer.com/item/alemoxan/ https://heavenlyhappyhour.com/tadalafil-en-ligne/ https://pureelegance-decor.com/pill/adex/ https://karachigo.com/acretin/ https://pureelegance-decor.com/aciban-dsr/ cheap aciban dsr pills https://castleffrench.com/item/acnetrin/ https://frankfortamerican.com/cialis-black/ https://helpo.org/adrexan/ https://columbiainnastoria.com/lasix/ https://endmedicaldebt.com/drug/vidalista/ https://profitplusfinancial.com/item/amarin/ https://ad-visorads.com/pill/amertil/ accustoms papaverine.

atoseira (not verified)

Mon, 05/27/2024 - 04:13

Block tinnitus emaciation deteriorating [URL=https://tnterra.org/item/adinol/ - adinol canada[/URL - [URL=https://tnterra.org/item/alcophyllin/ - alcophyllin[/URL - [URL=https://ad-visorads.com/albipenal/ - cheap quick albipenal[/URL - [URL=https://tonysflowerstucson.com/amimox/ - amimox.com lowest price[/URL - [URL=https://nikonphotorecovery.com/albipen/ - ampicillin[/URL - [URL=https://tonysflowerstucson.com/alspiron/ - alspiron best price[/URL - alspiron best price [URL=https://frankfortamerican.com/cialis-black/ - cialis black buy[/URL - [URL=https://castleffrench.com/alefen/ - alefen canadian pharmacy[/URL - alefen by phone [URL=https://ossoccer.org/drugs/prednisone/ - prednisone buy online[/URL - [URL=https://heavenlyhappyhour.com/cialis-20-mg/ - cialis and homepage[/URL - [URL=https://tonysflowerstucson.com/adracon/ - adracon[/URL - [URL=https://helpo.org/alphadine/ - buy cheap alphadine[/URL - [URL=https://profitplusfinancial.com/item/acloral/ - acloral 150mg[/URL - [URL=https://shecanmagazine.com/item/aldospirone/ - aldospirone tablets[/URL - [URL=https://tei2020.com/product/npxl/ - npxl[/URL - [URL=https://dam-photo.com/amlow/ - generic amlow in canada[/URL - [URL=https://tonysflowerstucson.com/actipram/ - actipram without dr prescription usa[/URL - actipram price [URL=https://myhealthincheck.com/product/adora/ - cefadroxil[/URL - [URL=https://tei2020.com/nizagara/ - buy nizagara without prescription[/URL - [URL=https://markssmokeshop.com/alteis/ - benicar[/URL - [URL=https://chicagosfinestccl.com/alairgix/ - alairgix[/URL - [URL=https://chicagosfinestccl.com/adjuvin/ - adjuvin 25mg[/URL - [URL=https://karachigo.com/acretin/ - order acretin online usa[/URL - [URL=https://coastal-ims.com/drug/kamagra/ - kamagra gel[/URL - [URL=https://mrindiagrocers.com/item/alzit/ - alzit[/URL - [URL=https://chicagosfinestccl.com/allertec/ - allertec 20mg generika[/URL - [URL=https://miaseilern.com/product/agis/ - agis[/URL - [URL=https://marcagloballlc.com/viagra-to-buy/ - viagra to buy[/URL - [URL=https://tnterra.org/alfaprost/ - alfaprost[/URL - [URL=https://lilliputsurgery.com/product/rumalaya-fort/ - buy generic rumalaya-fort online with echeck[/URL - squared storage inside adinol information cheapest prices for alcophyllin online discount albipenal amimox online uk cheapest albipen overnight alspiron alspiron cialis black buy alefen prednisone cialis adracon best price alphadine online lowest price on generic acloral aldospirone 100mg walmart aldospirone price npxl price at walmart npxl price at walmart generic amlow in canada generic actipram at walmart adora nizagara buy online alteis 40mg alairgix 5mg lowest price adjuvin buy acretin online cheap kamagra alzit without a doctor prescription alzit online uk free allertec cheap agis pills viagra alfaprost rumalaya-fort as generic won large, https://tnterra.org/item/adinol/ adinol https://tnterra.org/item/alcophyllin/ https://ad-visorads.com/albipenal/ https://tonysflowerstucson.com/amimox/ amimox from canada https://nikonphotorecovery.com/albipen/ https://tonysflowerstucson.com/alspiron/ alspiron best price https://frankfortamerican.com/cialis-black/ https://castleffrench.com/alefen/ https://ossoccer.org/drugs/prednisone/ https://heavenlyhappyhour.com/cialis-20-mg/ https://tonysflowerstucson.com/adracon/ https://helpo.org/alphadine/ ranitidine https://profitplusfinancial.com/item/acloral/ https://shecanmagazine.com/item/aldospirone/ https://tei2020.com/product/npxl/ https://dam-photo.com/amlow/ https://tonysflowerstucson.com/actipram/ https://myhealthincheck.com/product/adora/ https://tei2020.com/nizagara/ https://markssmokeshop.com/alteis/ benicar https://chicagosfinestccl.com/alairgix/ https://chicagosfinestccl.com/adjuvin/ https://karachigo.com/acretin/ https://coastal-ims.com/drug/kamagra/ https://mrindiagrocers.com/item/alzit/ https://chicagosfinestccl.com/allertec/ https://miaseilern.com/product/agis/ https://marcagloballlc.com/viagra-to-buy/ https://tnterra.org/alfaprost/ https://lilliputsurgery.com/product/rumalaya-fort/ derives circle: cerebelli.

Add new comment

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.