mirror of
https://github.com/golang/go
synced 2024-11-18 11:44:45 -07:00
[dev.link] cmd/link: remove Flag8 from amd64
It's only ever checked for plan 9 and it was irrelevantly set. Change-Id: I225d4be645f573ceccde47ec2236bf3dbeb0ea70 Reviewed-on: https://go-review.googlesource.com/c/go/+/234886 Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Cherry Zhang <cherryyz@google.com>
This commit is contained in:
parent
c551318046
commit
0ca6098f70
@ -690,16 +690,12 @@ func asmb2(ctxt *ld.Link, _ *loader.Loader) {
|
||||
fallthrough
|
||||
|
||||
case objabi.Hplan9:
|
||||
break
|
||||
|
||||
case objabi.Hlinux,
|
||||
objabi.Hfreebsd,
|
||||
objabi.Hnetbsd,
|
||||
objabi.Hopenbsd,
|
||||
objabi.Hdragonfly,
|
||||
objabi.Hsolaris:
|
||||
ld.Flag8 = true /* 64-bit addresses */
|
||||
|
||||
case objabi.Hwindows:
|
||||
break
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ var (
|
||||
FlagS = flag.Bool("s", false, "disable symbol table")
|
||||
flagU = flag.Bool("u", false, "reject unsafe packages")
|
||||
FlagW = flag.Bool("w", false, "disable DWARF generation")
|
||||
Flag8 bool // use 64-bit addresses in symbol table
|
||||
flag8 bool // use 64-bit addresses in symbol table
|
||||
flagInterpreter = flag.String("I", "", "use `linker` as ELF dynamic linker")
|
||||
FlagDebugTramp = flag.Int("debugtramp", 0, "debug trampolines")
|
||||
FlagStrictDups = flag.Int("strictdups", 0, "sanity check duplicate symbol contents during object file reading (1=warn 2=err).")
|
||||
@ -121,7 +121,7 @@ func Main(arch *sys.Arch, theArch Arch) {
|
||||
|
||||
// TODO(matloob): define these above and then check flag values here
|
||||
if ctxt.Arch.Family == sys.AMD64 && objabi.GOOS == "plan9" {
|
||||
flag.BoolVar(&Flag8, "8", false, "use 64-bit addresses in symbol table")
|
||||
flag.BoolVar(&flag8, "8", false, "use 64-bit addresses in symbol table")
|
||||
}
|
||||
flagHeadType := flag.String("H", "", "set header `type`")
|
||||
flag.BoolVar(&ctxt.linkShared, "linkshared", false, "link against installed Go shared libraries")
|
||||
|
@ -259,7 +259,7 @@ func putplan9sym(ctxt *Link, ldr *loader.Loader, s loader.Sym, char SymbolType)
|
||||
}
|
||||
l := 4
|
||||
addr := ldr.SymValue(s)
|
||||
if ctxt.IsAMD64() && !Flag8 {
|
||||
if ctxt.IsAMD64() && !flag8 {
|
||||
ctxt.Out.Write32b(uint32(addr >> 32))
|
||||
l = 8
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user