diff options
author | Russ Cox <rsc@golang.org> | 2014-04-16 22:08:00 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2014-04-16 22:08:00 -0400 |
commit | 70d330b5a3db8ce56983c1d36a0f43ce86857e8b (patch) | |
tree | 24ea8b9b79aa10066f27cbeb2bd35589f008289f /src/liblink/pcln.c | |
parent | 95c14bf6ef96625767e5625841207c8d2d6f6d8a (diff) | |
download | go-70d330b5a3db8ce56983c1d36a0f43ce86857e8b.tar.gz |
liblink, cmd/ld: reenable nosplit checking and test
The new code is adapted from the Go 1.2 nosplit code,
but it does not have the bug reported in issue 7623:
g% go run nosplit.go
g% go1.2 run nosplit.go
BUG
rejected incorrectly:
main 0 call f; f 120
linker output:
# _/tmp/go-test-nosplit021064539
main.main: nosplit stack overflow
120 guaranteed after split check in main.main
112 on entry to main.f
-8 after main.f uses 120
g%
Fixes issue 6931.
Fixes issue 7623.
LGTM=iant
R=golang-codereviews, iant, ality
CC=golang-codereviews, r
https://codereview.appspot.com/88190043
Diffstat (limited to 'src/liblink/pcln.c')
-rw-r--r-- | src/liblink/pcln.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/liblink/pcln.c b/src/liblink/pcln.c index 62c0e8501..4b2b85543 100644 --- a/src/liblink/pcln.c +++ b/src/liblink/pcln.c @@ -347,11 +347,11 @@ pciternext(Pciter *it) // pc delta v = getvarint(&it->p); - it->nextpc = it->pc + v; + it->nextpc = it->pc + v*it->pcscale; } void -pciterinit(Pciter *it, Pcdata *d) +pciterinit(Link *ctxt, Pciter *it, Pcdata *d) { it->d = *d; it->p = it->d.p; @@ -360,5 +360,6 @@ pciterinit(Pciter *it, Pcdata *d) it->value = -1; it->start = 1; it->done = 0; + it->pcscale = ctxt->arch->minlc; pciternext(it); } |