File tree Expand file tree Collapse file tree 3 files changed +32
-3
lines changed
Expand file tree Collapse file tree 3 files changed +32
-3
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ XGO_LDFLAGS='-s -w -X main.version=$(COMMIT_ID)'
1010# github.com/xjasonlyu/tun2socks/blob/bf745d0e0/Makefile#L14
1111LDFLAGS_DEBUG='-buildid = -X $(IMPORT_PATH ) /intra/core.Date=$(DATESTR ) -X $(IMPORT_PATH ) /intra/core.Commit=$(COMMIT_ID ) '
1212LDFLAGS ='-w -s -buildid= -X $(IMPORT_PATH ) /intra/core.Date=$(DATESTR ) -X $(IMPORT_PATH ) /intra/core.Commit=$(COMMIT_ID ) '
13- CGO_LDFLAGS ="$(CGO_LDFLAGS ) -s -w -Wl,-z,max-page-size=16384"
13+ CGO_LDFLAGS ="$(CGO_LDFLAGS ) -checklinkname=0 - s -w -Wl,-z,max-page-size=16384"
1414
1515# github.com/golang/mobile/blob/a1d90793fc/cmd/gomobile/bind.go#L36
1616GOBIND =bind -trimpath -v -x -a -javapkg com.celzero.firestack
Original file line number Diff line number Diff line change 1+ // Copyright (c) 2026 RethinkDNS and its authors.
2+ //
3+ // This Source Code Form is subject to the terms of the Mozilla Public
4+ // License, v. 2.0. If a copy of the MPL was not distributed with this
5+ // file, You can obtain one at http://mozilla.org/MPL/2.0/.
6+
7+ package core
8+
9+ import _ "unsafe" // required for go:linkname
10+
11+ //go:linkname runtimeGoTraceback runtime.gotraceback
12+ func runtimeGoTraceback () (level int32 , all , crash bool )
13+
14+ // GoTraceback returns the Go runtime's current traceback settings.
15+ func GoTraceback () (level int32 , all , crash bool ) {
16+ return runtimeGoTraceback ()
17+ }
18+
19+ //go:linkname runtimeEnviron runtime.environ
20+ func runtimeEnviron () []string
21+
22+ // 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`.
26+ func RuntimeEnviron () []string {
27+ return runtimeEnviron ()
28+ }
Original file line number Diff line number Diff line change @@ -518,8 +518,9 @@ func (t *rtunnel) stat() (*x.NetStat, error) {
518518 out .GOSt .NumCgo = int64 (runtime .NumCgoCall ())
519519 out .GOSt .NumCPU = int64 (runtime .NumCPU ())
520520
521- out .GOSt .Args = strings .Join (os .Args , ";" )
522- out .GOSt .Env = strings .Join (os .Environ (), ";" )
521+ level , all , crash := core .GoTraceback ()
522+ out .GOSt .Args = fmt .Sprintf ("%d;%t;%t" , level , all , crash )
523+ out .GOSt .Env = strings .Join (core .RuntimeEnviron (), ";" )
523524 out .GOSt .Pers , _ = os .Executable ()
524525
525526 if r := t .resolver ; r != nil {
You can’t perform that action at this time.
0 commit comments