mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/link: eliminate markextra
This appears to be leftover from when instruction selection happened in the linker. Many of the morestackX functions listed don't even exist anymore. Now that we select instructions within the compiler and assembler, normal deadcode elimination mechanisms should suffice for these symbols. Change-Id: I2cb1e435101392e7c983957c4acfbbcc87a5ca7d Reviewed-on: https://go-review.googlesource.com/38077 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
6bc593805f
commit
d343478295
1 changed files with 0 additions and 25 deletions
|
|
@ -127,27 +127,6 @@ func deadcode(ctxt *Link) {
|
||||||
ctxt.Textp = textp
|
ctxt.Textp = textp
|
||||||
}
|
}
|
||||||
|
|
||||||
var markextra = []string{
|
|
||||||
"runtime.morestack",
|
|
||||||
"runtime.morestackx",
|
|
||||||
"runtime.morestack00",
|
|
||||||
"runtime.morestack10",
|
|
||||||
"runtime.morestack01",
|
|
||||||
"runtime.morestack11",
|
|
||||||
"runtime.morestack8",
|
|
||||||
"runtime.morestack16",
|
|
||||||
"runtime.morestack24",
|
|
||||||
"runtime.morestack32",
|
|
||||||
"runtime.morestack40",
|
|
||||||
"runtime.morestack48",
|
|
||||||
|
|
||||||
// on arm, lock in the div/mod helpers too
|
|
||||||
"_div",
|
|
||||||
"_divu",
|
|
||||||
"_mod",
|
|
||||||
"_modu",
|
|
||||||
}
|
|
||||||
|
|
||||||
// methodref holds the relocations from a receiver type symbol to its
|
// methodref holds the relocations from a receiver type symbol to its
|
||||||
// method. There are three relocations, one for each of the fields in
|
// method. There are three relocations, one for each of the fields in
|
||||||
// the reflect.method struct: mtyp, ifn, and tfn.
|
// the reflect.method struct: mtyp, ifn, and tfn.
|
||||||
|
|
@ -222,9 +201,6 @@ func (d *deadcodepass) init() {
|
||||||
|
|
||||||
if SysArch.Family == sys.ARM {
|
if SysArch.Family == sys.ARM {
|
||||||
// mark some functions that are only referenced after linker code editing
|
// mark some functions that are only referenced after linker code editing
|
||||||
if obj.GOARM == 5 {
|
|
||||||
names = append(names, "_sfloat")
|
|
||||||
}
|
|
||||||
names = append(names, "runtime.read_tls_fallback")
|
names = append(names, "runtime.read_tls_fallback")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -254,7 +230,6 @@ func (d *deadcodepass) init() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
names = append(names, markextra...)
|
|
||||||
for _, s := range dynexp {
|
for _, s := range dynexp {
|
||||||
d.mark(s, nil)
|
d.mark(s, nil)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue