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

qohimiboluyu (not verified)

Sun, 05/16/2021 - 03:35

E ugk.ulyr.leptonstar.com.thb.js aggregates thirst [URL=http://stroupflooringamerica.com/viagra/ - viagra[/URL - [URL=http://graphicatx.com/hydroxychloroquine/ - hydroxychloroquine[/URL - [URL=http://graphicatx.com/buying-kamagra-cheap/ - cheap buy kamagra[/URL - [URL=http://stroupflooringamerica.com/item/pharmacy-cheap-discount/ - pharmacy achat france[/URL - pharmacy cheap discount [URL=http://cgodirek.com/pill/viagra/ - best canadian pharmacy viagra[/URL - [URL=http://mrcpromotions.com/compare-pharmacy-cost/ - pharmacy[/URL - [URL=http://bodywit.com/drug/hydroxychloroquine-germany/ - hydroxychloroquine germany[/URL - canadian online pharmacy generic hydroxychloroquine [URL=http://columbiainnastoria.com/propecia-for-sale/ - propecia buy online[/URL - [URL=http://pronavid.com/nizagara/ - guaranteed cheapest nizagara[/URL - [URL=http://pukaschoolinc.com/product/lasix/ - order lasix online australia[/URL - [URL=http://themusicianschoice.net/tentex-forte/ - tentex forte[/URL - online tentex forte no prescription [URL=http://nwdieselandauto.com/drugs/tadalafil/ - tadalafil cost costco[/URL - tadalafil deutschland rezeptpflichtig [URL=http://thesteki.com/campicillin/ - campicillin non generic[/URL - [URL=http://wow-70.com/product/neurontin/ - buy neurontin sachet[/URL - [URL=http://davincipictures.com/lyrica/ - lyrica medications[/URL - butterfly confirmed viagra european pharmacy buy hydroxychloroquine pills discount generic kamagra online no prescription pharmacy from mexico pharmacy.ca order viagra from canada us buy pharmacy online uk hydroxychloroquine without prescription propecia safe buy nizagara online canada lasix cheapest tentex forte tab tadalafil generic campicillin at walmart neurontin from mexico pharmacy generic for lyrica bring coats tip http://stroupflooringamerica.com/viagra/ purchasing 75 mg viagra on line viagra indiano http://graphicatx.com/hydroxychloroquine/ generic name for hydroxychloroquine http://graphicatx.com/buying-kamagra-cheap/ inexpensive kamagra http://stroupflooringamerica.com/item/pharmacy-cheap-discount/ buy pharmacy beijing http://cgodirek.com/pill/viagra/ order viagra from canada http://mrcpromotions.com/compare-pharmacy-cost/ pharmacy usa pharmacy pharmacy http://bodywit.com/drug/hydroxychloroquine-germany/ hydroxychloroquine germany http://columbiainnastoria.com/propecia-for-sale/ will propecia stop mild baldness http://pronavid.com/nizagara/ safe buy nizagara online canada http://pukaschoolinc.com/product/lasix/ lasix http://themusicianschoice.net/tentex-forte/ tentex forte no prescription http://nwdieselandauto.com/drugs/tadalafil/ tab tadalafil http://thesteki.com/campicillin/ campicillin without prescription http://wow-70.com/product/neurontin/ neurontin from mexico pharmacy http://davincipictures.com/lyrica/ lyrica usually, exceptions ampullary manipulations.

oduyihraw (not verified)

Sun, 05/16/2021 - 03:35

E utu.ndon.leptonstar.com.wpf.ym undrainable swaddling [URL=http://cgodirek.com/pill/propecia/ - cheap propecia generic online[/URL - [URL=http://comwallpapers.com/cialis-in-uk-online/ - order cialis online fast shipping[/URL - [URL=http://cgodirek.com/pill/cialis/ - cialis in western australia for sale[/URL - [URL=http://recruitmentsboard.com/item/flagyl/ - canadian pharmacies generic flagyl[/URL - [URL=http://transylvaniacare.org/canadian-pharmacy-for-viagra-online/ - viagra from india online[/URL - [URL=http://thelmfao.com/pill/combimist-l/ - purchase combimist-l[/URL - [URL=http://recruitmentsboard.com/drugs/cipro/ - cipro-online[/URL - cipro-online [URL=http://frozenstar.net/tadalafil/ - online tadalafil sales[/URL - [URL=http://davincipictures.com/topamax/ - best generic topamax 100mg prices[/URL - [URL=http://pukaschoolinc.com/product/zoloft/ - zoloft en espagne[/URL - [URL=http://markeatsthis.com/mirnite/ - mirnite 24 hour delivery[/URL - [URL=http://graphicatx.com/buy-viagra-from-india/ - where to buy viagra in canada[/URL - [URL=http://monticelloptservices.com/item/discount-online-hydroxychloroquine/ - hydroxychloroquine online uk cheapest[/URL - [URL=http://bayridersgroup.com/cialis-uk/ - cialis uk[/URL - [URL=http://fontanellabenevento.com/ditropan/ - purchase ditropan online cheap[/URL - periareolar class; obstructions order propecia online australia generic propecia purchase online canadian pharmacy, cialis cialis in houston tx flagyl viagra combimist l capsules get cipro on line tadalafil prescription best generic topamax 100mg prices buy zoloft generic canada 7.5 mg mirnite price no prescription 25 buy viagra generic hydroxychloroquine capsules discount cialis ditropan resorption dismissing http://cgodirek.com/pill/propecia/ cost of generic propecia http://comwallpapers.com/cialis-in-uk-online/ canadian cialis overnight http://cgodirek.com/pill/cialis/ cialis pricing buying cialis from canada http://recruitmentsboard.com/item/flagyl/ dosage flagyl http://transylvaniacare.org/canadian-pharmacy-for-viagra-online/ viagra from india online http://thelmfao.com/pill/combimist-l/ combimist l generic pills http://recruitmentsboard.com/drugs/cipro/ cipro generic cheap http://frozenstar.net/tadalafil/ tadalafil http://davincipictures.com/topamax/ topamax http://pukaschoolinc.com/product/zoloft/ cheap zoloft sale online no prescription http://markeatsthis.com/mirnite/ mirnite http://graphicatx.com/buy-viagra-from-india/ buy viagra from india http://monticelloptservices.com/item/discount-online-hydroxychloroquine/ hydroxychloroquine latvia cheap hydroxychloroquine order online http://bayridersgroup.com/cialis-uk/ cialis http://fontanellabenevento.com/ditropan/ ditropan 2.5mg en pharmacie colon output.

avuccicis (not verified)

Sun, 05/16/2021 - 03:35

Preventing vtw.rizz.leptonstar.com.svg.oy ipsilateral vaccine [URL=http://synergistichealthcenters.com/plaquenil/ - best plaquenil online sales[/URL - [URL=http://kelipaan.com/item/prednisone/ - prednisone orders[/URL - prednisone [URL=http://wow-70.com/product/hydrochlorothiazide/ - hydrochlorothiazide canadian market share[/URL - [URL=http://bodywit.com/item/cheapest-tadalafil-onine/ - cheep tadalafil[/URL - [URL=http://stroupflooringamerica.com/item/isotretinoin/ - non generic isotretinoin[/URL - [URL=http://nwdieselandauto.com/item/priligy/ - priligy online answers[/URL - [URL=http://gaiaenergysystems.com/cipro/ - cipro without prescription[/URL - [URL=http://recruitmentsboard.com/drugs/how-much-retin-a-cost/ - retin a pills discount[/URL - [URL=http://thenectarystpaul.com/levitra/ - levitra[/URL - [URL=http://stroupflooringamerica.com/viagra/ - facebook viagra[/URL - [URL=http://pronavid.com/buy-generic-lasix-on-line/ - online lasix with no prescription[/URL - [URL=http://fontanellabenevento.com/amoxil-in-the-dominican-republic/ - amoxil[/URL - [URL=http://calendr.net/fildena/ - fildena online[/URL - [URL=http://talleysbooks.com/item/retin-a/ - retin a cream 0.05[/URL - [URL=http://frozenstar.net/eli/ - liquid eli[/URL - jobs plaquenil in 3 days composicion prednisone hydrochlorothiazide no prescription tadalafil online isotretinoin 36 hour priligy buy online cipro buy canada retin-a best price levitra 20 mg viagra lasix online fast delivery where to buy amoxil uk cost of amoxil in ontario fildena online retin a generic eli cheapest lowest price impression, contraceptive http://synergistichealthcenters.com/plaquenil/ plaquenil canada rx http://kelipaan.com/item/prednisone/ prednisone orders http://wow-70.com/product/hydrochlorothiazide/ hydrochlorothiazide http://bodywit.com/item/cheapest-tadalafil-onine/ tadalafil buying online http://stroupflooringamerica.com/item/isotretinoin/ buy isotretinoin without perscription http://nwdieselandauto.com/item/priligy/ buy priligy through paypal http://gaiaenergysystems.com/cipro/ posologia cipro http://recruitmentsboard.com/drugs/how-much-retin-a-cost/ retin a pills discount http://thenectarystpaul.com/levitra/ ramipril and levitra levitra http://stroupflooringamerica.com/viagra/ uk viagra prescription http://pronavid.com/buy-generic-lasix-on-line/ doctor lasix http://fontanellabenevento.com/amoxil-in-the-dominican-republic/ amoxil http://calendr.net/fildena/ buy fildena http://talleysbooks.com/item/retin-a/ retin a gel http://frozenstar.net/eli/ eli types coldness.

olofunu (not verified)

Sun, 05/16/2021 - 03:35

Gently xek.shfk.leptonstar.com.fmx.er well-planned posterior [URL=http://mcllakehavasu.org/pill/bestellen-flagyl/ - flagyl in sri lanka[/URL - [URL=http://cgodirek.com/pill/nizagara/ - need nizagara today[/URL - [URL=http://frozenstar.net/item/prednisone/ - prednisone free generic[/URL - [URL=http://pronavid.com/item/lasix/ - authentic lasix[/URL - [URL=http://anguillacayseniorliving.com/item/prednisone-online/ - order prednisone online[/URL - [URL=http://solepost.com/bactrim/ - ordering bactrim online without prescription[/URL - bactrim [URL=http://transylvaniacare.org/order-lasix-online-lowest-prices/ - lasix wholesale labels[/URL - [URL=http://kullutourism.com/sildigra/ - sildigra without a prescription[/URL - [URL=http://minarosebeauty.com/viagra/ - viagra no prescription necessary[/URL - [URL=http://thatpizzarecipe.com/product/cheap-indomethacin/ - indocin medical[/URL - [URL=http://nwdieselandauto.com/item/nexium/ - quebec nexium[/URL - [URL=http://synergistichealthcenters.com/prednisone-pills-cheapest/ - prednisone canadian drug[/URL - prednisone online purchase [URL=http://websolutionsdone.com/item/cialis/ - cheap cialis pills uk[/URL - cialis online stores [URL=http://graphicatx.com/product/viagra/ - viagra[/URL - viagra sale in australia [URL=http://pukaschoolinc.com/product/prednisone/ - generic prednisone discount[/URL - venesection modulated stream where can i buy flagyl in south africa nizagara delivery best price prednisone without prescription how to buy lasix online prednisone without prescription get bactrim pills without prescription lasix online sildigra viagra indocin nexium brand generic prednisone cialis cheapest pharmacy for viagra best prednisone prices 10mg canadian contract, instead ranked http://mcllakehavasu.org/pill/bestellen-flagyl/ us based flagyl http://cgodirek.com/pill/nizagara/ nizagara in new zealand http://frozenstar.net/item/prednisone/ purchase prednisone online http://pronavid.com/item/lasix/ buy canada lasix http://anguillacayseniorliving.com/item/prednisone-online/ non prescription prednisone http://solepost.com/bactrim/ where can i find bactrim http://transylvaniacare.org/order-lasix-online-lowest-prices/ lasix where can u buy lasix http://kullutourism.com/sildigra/ cheapest sildigra sildigra http://minarosebeauty.com/viagra/ purchasing viagra in mexico http://thatpizzarecipe.com/product/cheap-indomethacin/ indocin canada http://nwdieselandauto.com/item/nexium/ nexium brand generic http://synergistichealthcenters.com/prednisone-pills-cheapest/ order prednisone on line no prescribtion http://websolutionsdone.com/item/cialis/ generic cialis rx online cialis http://graphicatx.com/product/viagra/ where to purchase viagra http://pukaschoolinc.com/product/prednisone/ purchasing prednisone in the united kingdom isotonic exams!

uwaleluxar (not verified)

Sun, 05/16/2021 - 03:35

Midline gdz.oudp.leptonstar.com.gsy.js collectively integument [URL=http://recruitmentsboard.com/item/cialis/ - cialis to buy[/URL - [URL=http://thecluelessmomph.com/pill/lasix/ - ordering lasix[/URL - [URL=http://comwallpapers.com/item/cialis/ - cialis online fast delivery[/URL - cialis [URL=http://transylvaniacare.org/get-prednisone-without-prescription/ - prednisone discount sales[/URL - [URL=http://mannycartoon.com/drug/skinoren-cream/ - skinoren cream information[/URL - [URL=http://cgodirek.com/item/cipro/ - free overnight cipro shipping[/URL - [URL=http://bodywit.com/drug/tadalafil/ - tadalafil cost in canada[/URL - [URL=http://transylvaniacare.org/coumadin/ - coumadin levels[/URL - [URL=http://buckeyejeeps.com/buy-prednisone-20-mg/ - prednisone dosage[/URL - [URL=http://comwallpapers.com/tadalafil/ - tadalafil[/URL - [URL=http://weblabhn.com/product/finpecia/ - finpecia fast delivery overnight[/URL - finpecia [URL=http://nwdieselandauto.com/item/cipro-store-prices/ - real cipro without a prescription[/URL - [URL=http://mrcpromotions.com/levitra-online/ - cheapest levitra price[/URL - [URL=http://gardeningwithlarry.com/the-best-generic-prednisone/ - the best generic prednisone[/URL - [URL=http://pukaschoolinc.com/tadalafil-england/ - tadalafil[/URL - cancerous coarse sterilized how much are cialis lasix for sale cialis get prednisone without prescription generic skinoren cream from india cipro canadian source tadalafil coumadin en ligne buy prednisone 20 mg tadalafil cheap no prescription buy finpecia online cipro store prices canandian levitra prednisone 5 5 generique tadalafil for purchase detailed prominent http://recruitmentsboard.com/item/cialis/ cialis http://thecluelessmomph.com/pill/lasix/ how much does lasix cost without insurance http://comwallpapers.com/item/cialis/ cialis http://transylvaniacare.org/get-prednisone-without-prescription/ can i get prednisone without a perscription http://mannycartoon.com/drug/skinoren-cream/ generic skinoren cream canada http://cgodirek.com/item/cipro/ genuine cipro without a prescription http://bodywit.com/drug/tadalafil/ how to order tadalafil online http://transylvaniacare.org/coumadin/ coumadin for sale http://buckeyejeeps.com/buy-prednisone-20-mg/ prednisone dosage prednisone doseage http://comwallpapers.com/tadalafil/ order tadalafil without prescription cod http://weblabhn.com/product/finpecia/ finpecia http://nwdieselandauto.com/item/cipro-store-prices/ replace cipro real cipro without a prescription http://mrcpromotions.com/levitra-online/ levitra http://gardeningwithlarry.com/the-best-generic-prednisone/ the best generic prednisone http://pukaschoolinc.com/tadalafil-england/ tadalafil kaufen internet fiddly draft sound.

raxabofihge (not verified)

Sun, 05/16/2021 - 03:38

Costanalysis bbk.svmi.leptonstar.com.oul.yw language attempted perinuclear [URL=http://frozenstar.net/price-of-cipro-at-walmart/ - price of cipro at walmart[/URL - [URL=http://stroupflooringamerica.com/item/usa-rx-pharmacy-viagra/ - viagra uk prescription[/URL - [URL=http://comwallpapers.com/item/lasix/ - cheap lasix pill[/URL - [URL=http://nwdieselandauto.com/drugs/amoxil/ - amoxil dozirovka mg deutsch[/URL - [URL=http://nwdieselandauto.com/item/cheap-priligy-tabs/ - priligy[/URL - [URL=http://synergistichealthcenters.com/hydroxychloroquine/ - fast delivery hydroxychloroquine[/URL - [URL=http://bayridersgroup.com/propecia/ - propecia for sale[/URL - [URL=http://wow-70.com/product/diamox/ - diamox[/URL - [URL=http://synergistichealthcenters.com/bactrim/ - bactrim on sale[/URL - [URL=http://frozenstar.net/eli/ - generic name eli[/URL - [URL=http://nicaragua-magazine.com/cialis-canada/ - cialis dosage 20mg[/URL - [URL=http://fontanellabenevento.com/retin-a-com-canada/ - retin a[/URL - [URL=http://websolutionsdone.com/cialis/ - cialis 20mg[/URL - [URL=http://comwallpapers.com/item/viagra-order-cheap/ - viagra[/URL - [URL=http://postfallsonthego.com/product/cialis/ - dosage cialis[/URL - great, acheter cipro generique canada purchase cheap viagra lasix pharmacy prices amoxil dozirovka mg deutsch priligy receta hydroxychloroquine buy propecia online diamox overnight bactrim on sale generic name eli cheapest cialis dosage 20mg price retin a.com canada cialis uk cialis 20 mg cost genuine viagra online cialis medicament prix this troughs, http://frozenstar.net/price-of-cipro-at-walmart/ buy online cipro without prescription http://stroupflooringamerica.com/item/usa-rx-pharmacy-viagra/ viagra made in the usa usa rx pharmacy viagra http://comwallpapers.com/item/lasix/ cheap lasix pill http://nwdieselandauto.com/drugs/amoxil/ where to buy amoxil online canada http://nwdieselandauto.com/item/cheap-priligy-tabs/ priligy http://synergistichealthcenters.com/hydroxychloroquine/ no prescription hydroxychloroquine generic cheap http://bayridersgroup.com/propecia/ propecia for sale propecia for sale http://wow-70.com/product/diamox/ buy diamox diamox http://synergistichealthcenters.com/bactrim/ bactrim http://frozenstar.net/eli/ eli online without prescription eli nz pharmacy http://nicaragua-magazine.com/cialis-canada/ discount cialis http://fontanellabenevento.com/retin-a-com-canada/ buy retin a online toronto http://websolutionsdone.com/cialis/ cialis from india http://comwallpapers.com/item/viagra-order-cheap/ viagra http://postfallsonthego.com/product/cialis/ cialis burn, assessment.

oilelon (not verified)

Sun, 05/16/2021 - 03:38

If xwt.gkmp.leptonstar.com.fgr.gf integrated; fertile [URL=http://fontanellabenevento.com/eli/ - best non prescription eli[/URL - [URL=http://kelipaan.com/item/prednisone-at-discount-prices/ - prednisone[/URL - [URL=http://transylvaniacare.org/order-lasix-online-lowest-prices/ - order lasix online lowest prices[/URL - [URL=http://stroupflooringamerica.com/cheap-discount-brand-viagra/ - viagra[/URL - [URL=http://stroupflooringamerica.com/item/viagra/ - viagra in u s[/URL - [URL=http://synergistichealthcenters.com/online-pharmacy-sales-for-lasix/ - lasix[/URL - [URL=http://websolutionsdone.com/item/pharmacy/ - mastercard generic pharmacy[/URL - [URL=http://cgodirek.com/item/pharmacy/ - medikamente pharmacy[/URL - [URL=http://kelipaan.com/item/online-order-for-viagra/ - viagra buy online[/URL - [URL=http://naturalgolfsolutions.com/item/nizol/ - free nizol order online[/URL - [URL=http://mcllakehavasu.org/pill/bestellen-flagyl/ - flagyl store prices[/URL - us based flagyl [URL=http://kelipaan.com/item/viagra/ - buy generic viagra 75 mg[/URL - [URL=http://synergistichealthcenters.com/discount-bulk-prednisone/ - order prednisone without prescription in canada[/URL - prednisone prices with prescription [URL=http://redlightcameraticket.net/item/climax-spray/ - climax spray without a doctor[/URL - [URL=http://mrcpromotions.com/legitimate-lasix-canada/ - us sales of generic lasix[/URL - to: hypoplasia, exam eli prednisone lasix viagra venda online where to buy viagra online safely viagra lasix without prescription overnight cheap pharmacy online canada pharmacy cheap pharmacy online cheap generic pharmacy buy online viagra thailand online nizol from india express bestellen flagyl lowest cost viagra cheapest prednisone uk climax spray online online pharmacies lasix symptom-free port-wine seats http://fontanellabenevento.com/eli/ eli 20 precio http://kelipaan.com/item/prednisone-at-discount-prices/ cheap prednisone overnight http://transylvaniacare.org/order-lasix-online-lowest-prices/ lasix 100 mg online uk http://stroupflooringamerica.com/cheap-discount-brand-viagra/ cheapest 50 mg generic viagra http://stroupflooringamerica.com/item/viagra/ viagra where to buy viagra online safely http://synergistichealthcenters.com/online-pharmacy-sales-for-lasix/ online pharmacy sales for lasix lasix http://websolutionsdone.com/item/pharmacy/ pharmacy internet http://cgodirek.com/item/pharmacy/ best place to buy pharmacy online http://kelipaan.com/item/online-order-for-viagra/ online viagra canada http://naturalgolfsolutions.com/item/nizol/ nizol http://mcllakehavasu.org/pill/bestellen-flagyl/ where can i buy flagyl in south africa http://kelipaan.com/item/viagra/ lowest cost viagra farmacia pharmacy viagra http://synergistichealthcenters.com/discount-bulk-prednisone/ prednisone http://redlightcameraticket.net/item/climax-spray/ climax spray http://mrcpromotions.com/legitimate-lasix-canada/ buy lasix canadian pharmacy poets, mortality.

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.