diff options
| author | Than McIntosh <thanm@google.com> | 2019-09-26 09:53:37 -0400 |
|---|---|---|
| committer | Than McIntosh <thanm@google.com> | 2019-09-27 13:58:59 +0000 |
| commit | cdd59205c48a4504925b1d65fdb68ff1f1250870 (patch) | |
| tree | ff2ace67424fa40803293bc5314e2a79603c06eb /src/cmd/internal/obj/objfile.go | |
| parent | e72f002ed0f2b13f114be914f63b1ddd276675f8 (diff) | |
| download | go-cdd59205c48a4504925b1d65fdb68ff1f1250870.tar.xz | |
cmd/compile: don't emit autom's into object file
Don't write Autom records when writing a function to the object file;
we no longer need them in the linker for DWARF processing. So as to
keep the object file format unchanged, write out a zero-length list of
automs to the object, as opposed to removing all references.
Updates #34554.
Change-Id: I42a1d67207ea7114ae4f3a315cf37effba57f190
Reviewed-on: https://go-review.googlesource.com/c/go/+/197499
Reviewed-by: Jeremy Faller <jeremy@golang.org>
Diffstat (limited to 'src/cmd/internal/obj/objfile.go')
| -rw-r--r-- | src/cmd/internal/obj/objfile.go | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/src/cmd/internal/obj/objfile.go b/src/cmd/internal/obj/objfile.go index 165e618d53..ab5627c0dd 100644 --- a/src/cmd/internal/obj/objfile.go +++ b/src/cmd/internal/obj/objfile.go @@ -31,7 +31,6 @@ type objWriter struct { nData int nReloc int nPcdata int - nAutom int nFuncdata int nFile int @@ -60,7 +59,6 @@ func (w *objWriter) addLengths(s *LSym) { w.nData += data w.nPcdata += len(pc.Pcdata) - w.nAutom += len(s.Func.Autom) w.nFuncdata += len(pc.Funcdataoff) w.nFile += len(pc.File) } @@ -69,7 +67,7 @@ func (w *objWriter) writeLengths() { w.writeInt(int64(w.nData)) w.writeInt(int64(w.nReloc)) w.writeInt(int64(w.nPcdata)) - w.writeInt(int64(w.nAutom)) + w.writeInt(int64(0)) // TODO: remove at next object file rev w.writeInt(int64(w.nFuncdata)) w.writeInt(int64(w.nFile)) } @@ -206,10 +204,6 @@ func (w *objWriter) writeRefs(s *LSym) { } if s.Type == objabi.STEXT { - for _, a := range s.Func.Autom { - w.writeRef(a.Asym, false) - w.writeRef(a.Gotype, false) - } pc := &s.Func.Pcln for _, d := range pc.Funcdata { w.writeRef(d, false) @@ -364,21 +358,7 @@ func (w *objWriter) writeSym(s *LSym) { flags |= 1 << 4 } w.writeInt(flags) - w.writeInt(int64(len(s.Func.Autom))) - for _, a := range s.Func.Autom { - w.writeRefIndex(a.Asym) - w.writeInt(int64(a.Aoffset)) - if a.Name == NAME_AUTO { - w.writeInt(objabi.A_AUTO) - } else if a.Name == NAME_PARAM { - w.writeInt(objabi.A_PARAM) - } else if a.Name == NAME_DELETED_AUTO { - w.writeInt(objabi.A_DELETED_AUTO) - } else { - log.Fatalf("%s: invalid local variable type %d", s.Name, a.Name) - } - w.writeRefIndex(a.Gotype) - } + w.writeInt(int64(0)) // TODO: remove at next object file rev pc := &s.Func.Pcln w.writeInt(int64(len(pc.Pcsp.P))) |
