]> Cypherpunks repositories - gostls13.git/commit
liblink, cmd/ld: reenable nosplit checking and test
authorRuss Cox <rsc@golang.org>
Thu, 17 Apr 2014 02:08:00 +0000 (22:08 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 17 Apr 2014 02:08:00 +0000 (22:08 -0400)
commit5e8c9226255b7e63dec1a286888f35782735aada
treef0354abae89c2bb1562c6c3a0fc499689fbcffd9
parent877e0a135f47e34a3b62a601f3d6e516a7b43179
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 #6931.
Fixes #7623.

LGTM=iant
R=golang-codereviews, iant, ality
CC=golang-codereviews, r
https://golang.org/cl/88190043
26 files changed:
include/link.h
src/cmd/5l/asm.c
src/cmd/6l/asm.c
src/cmd/8l/asm.c
src/cmd/ld/data.c
src/cmd/ld/dwarf.c
src/cmd/ld/ldelf.c
src/cmd/ld/ldmacho.c
src/cmd/ld/ldpe.c
src/cmd/ld/lib.c
src/cmd/ld/pcln.c
src/cmd/link/load.go
src/cmd/link/testdata/autosection.6
src/cmd/link/testdata/autoweak.6
src/cmd/link/testdata/dead.6
src/cmd/link/testdata/hello.6
src/cmd/link/testdata/layout.6
src/cmd/link/testdata/pclntab.6
src/liblink/asm5.c
src/liblink/asm6.c
src/liblink/asm8.c
src/liblink/obj6.c
src/liblink/objfile.c
src/liblink/pcln.c
src/pkg/debug/goobj/read.go
test/nosplit.go [new file with mode: 0644]