diff options
author | Keith Randall <khr@golang.org> | 2023-03-09 16:31:41 +0000 |
---|---|---|
committer | Keith Randall <khr@golang.org> | 2023-03-09 19:19:41 +0000 |
commit | 642542cb3c4b672cb34cde44a415c05bf1560a5e (patch) | |
tree | 8de0ffba0445a8220cb01ac191f44d8c1048c107 /src/cmd/link/internal/ld/deadcode.go | |
parent | aafc734c7807bafeb8aa69c019494f69965154b0 (diff) | |
download | go-642542cb3c4b672cb34cde44a415c05bf1560a5e.tar.gz go-642542cb3c4b672cb34cde44a415c05bf1560a5e.zip |
Revert "cmd/link: establish dependable package initialization order"
This reverts commit ce2a609909d9de3391a99a00fe140506f724f933.
aka CL 462035
Reason for revert: this CL is causing some problems in some internal Google programs.
Change-Id: I4476b8d8d2c3d7b5703d1d85c93baebb4b4e5d26
Reviewed-on: https://go-review.googlesource.com/c/go/+/474976
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Diffstat (limited to 'src/cmd/link/internal/ld/deadcode.go')
-rw-r--r-- | src/cmd/link/internal/ld/deadcode.go | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/cmd/link/internal/ld/deadcode.go b/src/cmd/link/internal/ld/deadcode.go index c80bacd92c..307a6dd42f 100644 --- a/src/cmd/link/internal/ld/deadcode.go +++ b/src/cmd/link/internal/ld/deadcode.go @@ -113,9 +113,6 @@ func (d *deadcodePass) init() { if d.mapinitnoop == 0 { panic("could not look up runtime.mapinitnoop") } - if d.ctxt.mainInittasks != 0 { - d.mark(d.ctxt.mainInittasks, 0) - } } func (d *deadcodePass) flood() { @@ -211,11 +208,6 @@ func (d *deadcodePass) flood() { } d.genericIfaceMethod[name] = true continue // don't mark referenced symbol - it is not needed in the final binary. - case objabi.R_INITORDER: - // inittasks has already run, so any R_INITORDER links are now - // superfluous - the only live inittask records are those which are - // in a scheduled list somewhere (e.g. runtime.moduledata.inittasks). - continue } rs := r.Sym() if isgotype && usedInIface && d.ldr.IsGoType(rs) && !d.ldr.AttrUsedInIface(rs) { |