Skip to content

Commit eb66211

Browse files
committed
core/overreach: rmv linkname
1 parent dd072f3 commit eb66211

3 files changed

Lines changed: 3 additions & 16 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ XGO_LDFLAGS='-s -w -X main.version=$(COMMIT_ID)'
1010
# github.com/xjasonlyu/tun2socks/blob/bf745d0e0/Makefile#L14
1111
LDFLAGS_DEBUG='-buildid= -X $(IMPORT_PATH)/intra/core.Date=$(DATESTR) -X $(IMPORT_PATH)/intra/core.Commit=$(COMMIT_ID)'
1212
LDFLAGS='-w -s -buildid= -X $(IMPORT_PATH)/intra/core.Date=$(DATESTR) -X $(IMPORT_PATH)/intra/core.Commit=$(COMMIT_ID)'
13-
CGO_LDFLAGS="$(CGO_LDFLAGS) -checklinkname=0 -s -w -Wl,-z,max-page-size=16384"
13+
CGO_LDFLAGS="$(CGO_LDFLAGS) -s -w -Wl,-z,max-page-size=16384"
1414

1515
# github.com/golang/mobile/blob/a1d90793fc/cmd/gomobile/bind.go#L36
1616
GOBIND=bind -trimpath -v -x -a -javapkg com.celzero.firestack

intra/core/overreach.go

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,9 @@ package core
88

99
import (
1010
"syscall"
11-
_ "unsafe"
12-
) // required for go:linkname
13-
14-
//go:linkname runtimeGoTraceback gotraceback
15-
func runtimeGoTraceback() (level int32, all, crash bool)
16-
17-
// GoTraceback returns the Go runtime's current traceback settings.
18-
func GoTraceback() (level int32, all, crash bool) {
19-
return runtimeGoTraceback()
20-
}
11+
)
2112

2213
// RuntimeEnviron returns the Go runtime's cached environment slice.
23-
//
24-
// Warning: building with this file enabled requires disabling the linker's
25-
// linkname checks: `-ldflags=-checklinkname=0`.
2614
func RuntimeEnviron() []string {
2715
return syscall.Environ()
2816
}

intra/tunnel.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,8 +518,7 @@ func (t *rtunnel) stat() (*x.NetStat, error) {
518518
out.GOSt.NumCgo = int64(runtime.NumCgoCall())
519519
out.GOSt.NumCPU = int64(runtime.NumCPU())
520520

521-
level, all, crash := core.GoTraceback()
522-
out.GOSt.Args = fmt.Sprintf("%d;%t;%t", level, all, crash)
521+
out.GOSt.Args = strings.Join(os.Args, ";")
523522
out.GOSt.Env = strings.Join(core.RuntimeEnviron(), ";")
524523
out.GOSt.Pers, _ = os.Executable()
525524

0 commit comments

Comments
 (0)