]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.link] cmd/link: remove symbol.FuncInfo
authorCherry Zhang <cherryyz@google.com>
Sun, 12 Apr 2020 16:52:16 +0000 (12:52 -0400)
committerCherry Zhang <cherryyz@google.com>
Mon, 13 Apr 2020 17:48:49 +0000 (17:48 +0000)
It is no longer used. The only remaining use is in generating
Plan 9 debug info, which is already not supported.

Change-Id: Ia023d6f2fa7d57b97ba861ce464e2eec8ac2d1f5
Reviewed-on: https://go-review.googlesource.com/c/go/+/228142
Reviewed-by: Than McIntosh <thanm@google.com>
src/cmd/link/internal/ld/lib.go
src/cmd/link/internal/sym/sizeof_test.go
src/cmd/link/internal/sym/symbol.go

index a5960455e7c77b81e143e27836b0813f9fc1d460..727cb056fc0c4c592c4d26bd57e8bb8acaf79d33 100644 (file)
@@ -2604,17 +2604,6 @@ func genasmsym(ctxt *Link, put func(*Link, *sym.Symbol, string, SymbolType, int6
 
        for _, s := range ctxt.Textp {
                put(ctxt, s, s.Name, TextSym, s.Value, s.Gotype)
-
-               locals := int32(0)
-               if s.FuncInfo != nil {
-                       locals = s.FuncInfo.Locals
-               }
-               // NOTE(ality): acid can't produce a stack trace without .frame symbols
-               put(ctxt, nil, ".frame", FrameSym, int64(locals)+int64(ctxt.Arch.PtrSize), nil)
-
-               if s.FuncInfo == nil {
-                       continue
-               }
        }
 
        if ctxt.Debugvlog != 0 || *flagN {
index e6e3916dad826f43782a92f8b7af0e8da56798ed..3e97a833dfaa2079b8d46ec73ffbd87e764e49c0 100644 (file)
@@ -21,7 +21,7 @@ func TestSizeof(t *testing.T) {
                _32bit uintptr     // size on 32bit platforms
                _64bit uintptr     // size on 64bit platforms
        }{
-               {Symbol{}, 108, 176},
+               {Symbol{}, 104, 168},
        }
 
        for _, tt := range tests {
index 1fee966c12f75fad5be092f605791805aa1fdd97..9a6791e16f81a660dc4a7f83868fa829c4911e46 100644 (file)
@@ -31,7 +31,6 @@ type Symbol struct {
        File        string // actually package!
        auxinfo     *AuxSymbol
        Sect        *Section
-       FuncInfo    *FuncInfo
        Unit        *CompilationUnit
        // P contains the raw symbol data.
        P []byte
@@ -519,29 +518,6 @@ func SortSub(l *Symbol) *Symbol {
        return l
 }
 
-type FuncInfo struct {
-       Args        int32
-       Locals      int32
-       Pcsp        Pcdata
-       Pcfile      Pcdata
-       Pcline      Pcdata
-       Pcinline    Pcdata
-       Pcdata      []Pcdata
-       Funcdata    []*Symbol
-       Funcdataoff []int64
-       File        []*Symbol
-       InlTree     []InlinedCall
-}
-
-// InlinedCall is a node in a local inlining tree (FuncInfo.InlTree).
-type InlinedCall struct {
-       Parent   int32   // index of parent in InlTree
-       File     *Symbol // file of the inlined call
-       Line     int32   // line number of the inlined call
-       Func     string  // name of the function that was inlined
-       ParentPC int32   // PC of the instruction just before the inlined body (offset from function start)
-}
-
 type Pcdata struct {
        P []byte
 }