summaryrefslogtreecommitdiff
path: root/sys/src/cmd/2l/obj.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2020-04-11 01:26:36 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2020-04-11 01:26:36 +0200
commit9d46360c9d83fa95f42f1eebbad49ecd9281fb0d (patch)
tree58d0a1110febae03a4b0231c6107adb88fb57821 /sys/src/cmd/2l/obj.c
parent1d3644a1684bd191f3a36568d94c2587c2d9f24f (diff)
backout the gethunk() again, as that breaks the assemblers
the assemblers share gethunk() cc/macbody but are compiled without compat.c, so calls such as getenv() trigger malloc() which does its own sbrk() calls, breaking the continuity of the hunk. so this change needs another revision. until then, this is backed out.
Diffstat (limited to 'sys/src/cmd/2l/obj.c')
-rw-r--r--sys/src/cmd/2l/obj.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/src/cmd/2l/obj.c b/sys/src/cmd/2l/obj.c
index 653f04fa2..411d2a5f5 100644
--- a/sys/src/cmd/2l/obj.c
+++ b/sys/src/cmd/2l/obj.c
@@ -1121,11 +1121,8 @@ gethunk(void)
diag("out of memory");
errorexit();
}
- if(nhunk == 0)
- hunk = h;
- else
- nh += (h - hunk) - nhunk;
- nhunk += nh;
+ hunk = h;
+ nhunk = nh;
thunk += nh;
}