diff --git a/src/cmd/link/internal/ld/main.go b/src/cmd/link/internal/ld/main.go index 8a812c924a..bfa3f70a9e 100644 --- a/src/cmd/link/internal/ld/main.go +++ b/src/cmd/link/internal/ld/main.go @@ -202,7 +202,9 @@ func Main(arch *sys.Arch, theArch Arch) { ctxt.dostrdata() deadcode(ctxt) - fieldtrack(ctxt) + if objabi.Fieldtrack_enabled != 0 { + fieldtrack(ctxt) + } ctxt.callgraph() ctxt.doelf()