summaryrefslogtreecommitdiff
path: root/src/cmd/6l/pass.c
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-10-03 10:37:12 -0700
committerRuss Cox <rsc@golang.org>2009-10-03 10:37:12 -0700
commit1bb8f19f5e9016a9eb118b8aba2b5689b4505812 (patch)
tree7b69b0974f4999bac76d11abed2071a2dc9e97aa /src/cmd/6l/pass.c
parent6b7539d607f26a1b1cd3eda71fc123ad4d52a133 (diff)
downloadgolang-1bb8f19f5e9016a9eb118b8aba2b5689b4505812.tar.gz
8c, 8l dynamic loading support.
better mach binaries. cgo working on darwin+linux amd64+386. eliminated context switches - pi is 30x faster. add libcgo to build. on snow leopard: - non-cgo binaries work; all tests pass. - cgo binaries work on amd64 but not 386. R=r DELTA=2031 (1316 added, 626 deleted, 89 changed) OCL=35264 CL=35304
Diffstat (limited to 'src/cmd/6l/pass.c')
-rw-r--r--src/cmd/6l/pass.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/cmd/6l/pass.c b/src/cmd/6l/pass.c
index c2f560500..2da88bac1 100644
--- a/src/cmd/6l/pass.c
+++ b/src/cmd/6l/pass.c
@@ -142,6 +142,11 @@ dobss(void)
Sym *s;
int32 t;
+ if(dynptrsize > 0) {
+ /* dynamic pointer section between data and bss */
+ datsize = rnd(datsize, 8);
+ }
+
/* now the bss */
bsssize = 0;
for(i=0; i<NHASH; i++)
@@ -154,12 +159,13 @@ dobss(void)
s->size = t;
if(t >= 8)
bsssize = rnd(bsssize, 8);
- s->value = bsssize + datsize;
+ s->value = bsssize + dynptrsize + datsize;
bsssize += t;
}
+
xdefine("data", SBSS, 0);
xdefine("edata", SBSS, datsize);
- xdefine("end", SBSS, bsssize + datsize);
+ xdefine("end", SBSS, dynptrsize + bsssize + datsize);
}
Prog*