env GOGARBLE=test/main garble build exec ./main cmp stderr main.stderr ! binsubstr main$exe 'privateAdd' 'PublicAdd' [short] stop # no need to verify this with -short garble -tiny build exec ./main cmp stderr main.stderr ! binsubstr main$exe 'privateAdd' 'PublicAdd' go build exec ./main cmp stderr main.stderr binsubstr main$exe 'privateAdd' 'PublicAdd' -- go.mod -- module test/main go 1.17 -- main.go -- package main import ( "test/main/imported" ) func privateAdd(x, y int64) int64 func main() { println(privateAdd(1, 2)) println(imported.PublicAdd(3, 4)) } -- main.s -- TEXT ·privateAdd(SB),$0-24 MOVQ x+0(FP), BX MOVQ y+8(FP), BP ADDQ BP, BX MOVQ BX, ret+16(FP) RET -- imported/imported.go -- package imported func PublicAdd(x, y int64) int64 -- imported/imported.s -- TEXT ·PublicAdd(SB),$0-24 MOVQ x+0(FP), BX MOVQ y+8(FP), BP ADDQ BP, BX MOVQ BX, ret+16(FP) RET -- main.stderr -- 3 7