Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(33)

Delta Between Two Patch Sets: src/cmd/ld/lib.c

Issue 13213043: cgo: enable cgo on dragonfly
Left Patch Set: Created 11 years, 7 months ago
Right Patch Set: diff -r 2aef8fd83bbd https://go.googlecode.com/hg Created 11 years, 7 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « src/cmd/6l/obj.c ('k') | src/pkg/go/build/build.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 // Derived from Inferno utils/6l/obj.c and utils/6l/span.c 1 // Derived from Inferno utils/6l/obj.c and utils/6l/span.c
2 // http://code.google.com/p/inferno-os/source/browse/utils/6l/obj.c 2 // http://code.google.com/p/inferno-os/source/browse/utils/6l/obj.c
3 // http://code.google.com/p/inferno-os/source/browse/utils/6l/span.c 3 // http://code.google.com/p/inferno-os/source/browse/utils/6l/span.c
4 // 4 //
5 // Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved. 5 // Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved.
6 // Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net) 6 // Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net)
7 // Portions Copyright © 1997-1999 Vita Nuova Limited 7 // Portions Copyright © 1997-1999 Vita Nuova Limited
8 // Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuov a.com) 8 // Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuov a.com)
9 // Portions Copyright © 2004,2006 Bruce Ellis 9 // Portions Copyright © 2004,2006 Bruce Ellis
10 // Portions Copyright © 2005-2007 C H Forsyth (forsyth@terzarima.net) 10 // Portions Copyright © 2005-2007 C H Forsyth (forsyth@terzarima.net)
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 for(i=0; i<nelem(internalpkg); i++) { 578 for(i=0; i<nelem(internalpkg); i++) {
579 if(strcmp(pkg, internalpkg[i]) == 0) { 579 if(strcmp(pkg, internalpkg[i]) == 0) {
580 isinternal = 1; 580 isinternal = 1;
581 break; 581 break;
582 } 582 }
583 } 583 }
584 584
585 if(!isinternal) 585 if(!isinternal)
586 externalobj = 1; 586 externalobj = 1;
587 587
588 // DragonFly declares errno with __thread, which results in a symbol
589 // type of R_386_TLS_GD or R_X86_64_TLSGD. The Go linker does not
590 // currently know how to handle TLS relocations, hence we have to
591 // force external linking for any libraries that link in code that
592 // uses errno. This can be removed if the Go linker ever supports
593 // these relocation types.
594 if(HEADTYPE == Hdragonfly)
595 if(strcmp(pkg, "net") == 0 || strcmp(pkg, "os/user") == 0)
596 externalobj = 1;
597
588 if(nhostobj >= mhostobj) { 598 if(nhostobj >= mhostobj) {
589 if(mhostobj == 0) 599 if(mhostobj == 0)
590 mhostobj = 16; 600 mhostobj = 16;
591 else 601 else
592 mhostobj *= 2; 602 mhostobj *= 2;
593 hostobj = erealloc(hostobj, mhostobj*sizeof hostobj[0]); 603 hostobj = erealloc(hostobj, mhostobj*sizeof hostobj[0]);
594 } 604 }
595 h = &hostobj[nhostobj++]; 605 h = &hostobj[nhostobj++];
596 h->ld = ld; 606 h->ld = ld;
597 h->pkg = estrdup(pkg); 607 h->pkg = estrdup(pkg);
(...skipping 1916 matching lines...) Expand 10 before | Expand all | Expand 10 after
2514 symgrow(ftab, start+(nhistfile+1)*4); 2524 symgrow(ftab, start+(nhistfile+1)*4);
2515 setuint32(ftab, start, nhistfile); 2525 setuint32(ftab, start, nhistfile);
2516 for(s = filesyms; s != S; s = s->next) 2526 for(s = filesyms; s != S; s = s->next)
2517 setuint32(ftab, start + s->value*4, ftabaddstring(ftab, s->name) ); 2527 setuint32(ftab, start + s->value*4, ftabaddstring(ftab, s->name) );
2518 2528
2519 ftab->size = ftab->np; 2529 ftab->size = ftab->np;
2520 ········ 2530 ········
2521 if(debug['v']) 2531 if(debug['v'])
2522 Bprint(&bso, "%5.2f pclntab=%lld bytes, funcdata total %lld byte s\n", cputime(), (vlong)ftab->size, (vlong)funcdata_bytes); 2532 Bprint(&bso, "%5.2f pclntab=%lld bytes, funcdata total %lld byte s\n", cputime(), (vlong)ftab->size, (vlong)funcdata_bytes);
2523 }······· 2533 }·······
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b