mirror of
https://github.com/golang/go
synced 2024-11-05 12:06:15 -07:00
cmd/link, cmd/internal/obj: stop exporting various names
Just happened to notice that these names (funcAlign and friends) are never referenced outside their package, so no need to export them. Change-Id: I4bbdaa4b0ef330c3c3ef50a2ca39593977a83545 Reviewed-on: https://go-review.googlesource.com/31496 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
parent
832082b44e
commit
e32ac7978d
@ -39,7 +39,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
FuncAlign = 16
|
funcAlign = 16
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -633,7 +633,7 @@ func span7(ctxt *obj.Link, cursym *obj.LSym) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
c += -c & (FuncAlign - 1)
|
c += -c & (funcAlign - 1)
|
||||||
cursym.Size = c
|
cursym.Size = c
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -806,7 +806,7 @@ func addpool(ctxt *obj.Link, p *obj.Prog, a *obj.Addr) {
|
|||||||
ctxt.Elitrl.Link = q
|
ctxt.Elitrl.Link = q
|
||||||
}
|
}
|
||||||
ctxt.Elitrl = q
|
ctxt.Elitrl = q
|
||||||
pool.size = -pool.size & (FuncAlign - 1)
|
pool.size = -pool.size & (funcAlign - 1)
|
||||||
pool.size += uint32(sz)
|
pool.size += uint32(sz)
|
||||||
p.Pcond = q
|
p.Pcond = q
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,7 @@ import (
|
|||||||
// Instruction layout.
|
// Instruction layout.
|
||||||
|
|
||||||
const (
|
const (
|
||||||
FuncAlign = 8
|
funcAlign = 8
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -418,7 +418,7 @@ func span0(ctxt *obj.Link, cursym *obj.LSym) {
|
|||||||
cursym.Size = c
|
cursym.Size = c
|
||||||
}
|
}
|
||||||
|
|
||||||
c += -c & (FuncAlign - 1)
|
c += -c & (funcAlign - 1)
|
||||||
cursym.Size = c
|
cursym.Size = c
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -40,7 +40,7 @@ import (
|
|||||||
// Instruction layout.
|
// Instruction layout.
|
||||||
|
|
||||||
const (
|
const (
|
||||||
FuncAlign = 8
|
funcAlign = 8
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -569,7 +569,7 @@ func span9(ctxt *obj.Link, cursym *obj.LSym) {
|
|||||||
cursym.Size = c
|
cursym.Size = c
|
||||||
}
|
}
|
||||||
|
|
||||||
c += -c & (FuncAlign - 1)
|
c += -c & (funcAlign - 1)
|
||||||
cursym.Size = c
|
cursym.Size = c
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -38,7 +38,7 @@ import (
|
|||||||
|
|
||||||
// instruction layout.
|
// instruction layout.
|
||||||
const (
|
const (
|
||||||
FuncAlign = 16
|
funcAlign = 16
|
||||||
)
|
)
|
||||||
|
|
||||||
type Optab struct {
|
type Optab struct {
|
||||||
@ -433,8 +433,8 @@ func spanz(ctxt *obj.Link, cursym *obj.LSym) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cursym.Size = int64(len(buffer))
|
cursym.Size = int64(len(buffer))
|
||||||
if cursym.Size%FuncAlign != 0 {
|
if cursym.Size%funcAlign != 0 {
|
||||||
cursym.Size += FuncAlign - (cursym.Size % FuncAlign)
|
cursym.Size += funcAlign - (cursym.Size % funcAlign)
|
||||||
}
|
}
|
||||||
cursym.Grow(cursym.Size)
|
cursym.Grow(cursym.Size)
|
||||||
copy(cursym.P, buffer)
|
copy(cursym.P, buffer)
|
||||||
|
@ -56,7 +56,7 @@ const (
|
|||||||
//
|
//
|
||||||
LoopAlign = 16
|
LoopAlign = 16
|
||||||
MaxLoopPad = 0
|
MaxLoopPad = 0
|
||||||
FuncAlign = 16
|
funcAlign = 16
|
||||||
)
|
)
|
||||||
|
|
||||||
type Optab struct {
|
type Optab struct {
|
||||||
|
@ -31,13 +31,13 @@
|
|||||||
package amd64
|
package amd64
|
||||||
|
|
||||||
const (
|
const (
|
||||||
MaxAlign = 32 // max data alignment
|
maxAlign = 32 // max data alignment
|
||||||
MinAlign = 1 // min data alignment
|
minAlign = 1 // min data alignment
|
||||||
FuncAlign = 16
|
funcAlign = 16
|
||||||
)
|
)
|
||||||
|
|
||||||
/* Used by ../internal/ld/dwarf.go */
|
/* Used by ../internal/ld/dwarf.go */
|
||||||
const (
|
const (
|
||||||
DWARFREGSP = 7
|
dwarfRegSP = 7
|
||||||
DWARFREGLR = 16
|
dwarfRegLR = 16
|
||||||
)
|
)
|
||||||
|
@ -43,11 +43,11 @@ func Init() {
|
|||||||
ld.SysArch = sys.ArchAMD64P32
|
ld.SysArch = sys.ArchAMD64P32
|
||||||
}
|
}
|
||||||
|
|
||||||
ld.Thearch.Funcalign = FuncAlign
|
ld.Thearch.Funcalign = funcAlign
|
||||||
ld.Thearch.Maxalign = MaxAlign
|
ld.Thearch.Maxalign = maxAlign
|
||||||
ld.Thearch.Minalign = MinAlign
|
ld.Thearch.Minalign = minAlign
|
||||||
ld.Thearch.Dwarfregsp = DWARFREGSP
|
ld.Thearch.Dwarfregsp = dwarfRegSP
|
||||||
ld.Thearch.Dwarfreglr = DWARFREGLR
|
ld.Thearch.Dwarfreglr = dwarfRegLR
|
||||||
|
|
||||||
ld.Thearch.Adddynrel = adddynrel
|
ld.Thearch.Adddynrel = adddynrel
|
||||||
ld.Thearch.Archinit = archinit
|
ld.Thearch.Archinit = archinit
|
||||||
|
@ -63,13 +63,13 @@ package arm
|
|||||||
// THE SOFTWARE.
|
// THE SOFTWARE.
|
||||||
|
|
||||||
const (
|
const (
|
||||||
MaxAlign = 8 // max data alignment
|
maxAlign = 8 // max data alignment
|
||||||
MinAlign = 1 // min data alignment
|
minAlign = 1 // min data alignment
|
||||||
FuncAlign = 4 // single-instruction alignment
|
funcAlign = 4 // single-instruction alignment
|
||||||
)
|
)
|
||||||
|
|
||||||
/* Used by ../internal/ld/dwarf.go */
|
/* Used by ../internal/ld/dwarf.go */
|
||||||
const (
|
const (
|
||||||
DWARFREGSP = 13
|
dwarfRegSP = 13
|
||||||
DWARFREGLR = 14
|
dwarfRegLR = 14
|
||||||
)
|
)
|
||||||
|
@ -40,11 +40,11 @@ import (
|
|||||||
func Init() {
|
func Init() {
|
||||||
ld.SysArch = sys.ArchARM
|
ld.SysArch = sys.ArchARM
|
||||||
|
|
||||||
ld.Thearch.Funcalign = FuncAlign
|
ld.Thearch.Funcalign = funcAlign
|
||||||
ld.Thearch.Maxalign = MaxAlign
|
ld.Thearch.Maxalign = maxAlign
|
||||||
ld.Thearch.Minalign = MinAlign
|
ld.Thearch.Minalign = minAlign
|
||||||
ld.Thearch.Dwarfregsp = DWARFREGSP
|
ld.Thearch.Dwarfregsp = dwarfRegSP
|
||||||
ld.Thearch.Dwarfreglr = DWARFREGLR
|
ld.Thearch.Dwarfreglr = dwarfRegLR
|
||||||
|
|
||||||
ld.Thearch.Adddynrel = adddynrel
|
ld.Thearch.Adddynrel = adddynrel
|
||||||
ld.Thearch.Archinit = archinit
|
ld.Thearch.Archinit = archinit
|
||||||
|
@ -62,13 +62,13 @@ package arm64
|
|||||||
// THE SOFTWARE.
|
// THE SOFTWARE.
|
||||||
|
|
||||||
const (
|
const (
|
||||||
MaxAlign = 32 // max data alignment
|
maxAlign = 32 // max data alignment
|
||||||
MinAlign = 1 // min data alignment
|
minAlign = 1 // min data alignment
|
||||||
FuncAlign = 8
|
funcAlign = 8
|
||||||
)
|
)
|
||||||
|
|
||||||
/* Used by ../internal/ld/dwarf.go */
|
/* Used by ../internal/ld/dwarf.go */
|
||||||
const (
|
const (
|
||||||
DWARFREGSP = 31
|
dwarfRegSP = 31
|
||||||
DWARFREGLR = 30
|
dwarfRegLR = 30
|
||||||
)
|
)
|
||||||
|
@ -40,11 +40,11 @@ import (
|
|||||||
func Init() {
|
func Init() {
|
||||||
ld.SysArch = sys.ArchARM64
|
ld.SysArch = sys.ArchARM64
|
||||||
|
|
||||||
ld.Thearch.Funcalign = FuncAlign
|
ld.Thearch.Funcalign = funcAlign
|
||||||
ld.Thearch.Maxalign = MaxAlign
|
ld.Thearch.Maxalign = maxAlign
|
||||||
ld.Thearch.Minalign = MinAlign
|
ld.Thearch.Minalign = minAlign
|
||||||
ld.Thearch.Dwarfregsp = DWARFREGSP
|
ld.Thearch.Dwarfregsp = dwarfRegSP
|
||||||
ld.Thearch.Dwarfreglr = DWARFREGLR
|
ld.Thearch.Dwarfreglr = dwarfRegLR
|
||||||
|
|
||||||
ld.Thearch.Adddynrel = adddynrel
|
ld.Thearch.Adddynrel = adddynrel
|
||||||
ld.Thearch.Archinit = archinit
|
ld.Thearch.Archinit = archinit
|
||||||
|
@ -62,13 +62,13 @@ package mips64
|
|||||||
// THE SOFTWARE.
|
// THE SOFTWARE.
|
||||||
|
|
||||||
const (
|
const (
|
||||||
MaxAlign = 32 // max data alignment
|
maxAlign = 32 // max data alignment
|
||||||
MinAlign = 1 // min data alignment
|
minAlign = 1 // min data alignment
|
||||||
FuncAlign = 8
|
funcAlign = 8
|
||||||
)
|
)
|
||||||
|
|
||||||
/* Used by ../internal/ld/dwarf.go */
|
/* Used by ../internal/ld/dwarf.go */
|
||||||
const (
|
const (
|
||||||
DWARFREGSP = 29
|
dwarfRegSP = 29
|
||||||
DWARFREGLR = 31
|
dwarfRegLR = 31
|
||||||
)
|
)
|
||||||
|
@ -44,11 +44,11 @@ func Init() {
|
|||||||
ld.SysArch = sys.ArchMIPS64
|
ld.SysArch = sys.ArchMIPS64
|
||||||
}
|
}
|
||||||
|
|
||||||
ld.Thearch.Funcalign = FuncAlign
|
ld.Thearch.Funcalign = funcAlign
|
||||||
ld.Thearch.Maxalign = MaxAlign
|
ld.Thearch.Maxalign = maxAlign
|
||||||
ld.Thearch.Minalign = MinAlign
|
ld.Thearch.Minalign = minAlign
|
||||||
ld.Thearch.Dwarfregsp = DWARFREGSP
|
ld.Thearch.Dwarfregsp = dwarfRegSP
|
||||||
ld.Thearch.Dwarfreglr = DWARFREGLR
|
ld.Thearch.Dwarfreglr = dwarfRegLR
|
||||||
|
|
||||||
ld.Thearch.Adddynrel = adddynrel
|
ld.Thearch.Adddynrel = adddynrel
|
||||||
ld.Thearch.Archinit = archinit
|
ld.Thearch.Archinit = archinit
|
||||||
|
@ -62,13 +62,13 @@ package ppc64
|
|||||||
// THE SOFTWARE.
|
// THE SOFTWARE.
|
||||||
|
|
||||||
const (
|
const (
|
||||||
MaxAlign = 32 // max data alignment
|
maxAlign = 32 // max data alignment
|
||||||
MinAlign = 1 // min data alignment
|
minAlign = 1 // min data alignment
|
||||||
FuncAlign = 8
|
funcAlign = 8
|
||||||
)
|
)
|
||||||
|
|
||||||
/* Used by ../internal/ld/dwarf.go */
|
/* Used by ../internal/ld/dwarf.go */
|
||||||
const (
|
const (
|
||||||
DWARFREGSP = 1
|
dwarfRegSP = 1
|
||||||
DWARFREGLR = 65
|
dwarfRegLR = 65
|
||||||
)
|
)
|
||||||
|
@ -44,11 +44,11 @@ func Init() {
|
|||||||
ld.SysArch = sys.ArchPPC64
|
ld.SysArch = sys.ArchPPC64
|
||||||
}
|
}
|
||||||
|
|
||||||
ld.Thearch.Funcalign = FuncAlign
|
ld.Thearch.Funcalign = funcAlign
|
||||||
ld.Thearch.Maxalign = MaxAlign
|
ld.Thearch.Maxalign = maxAlign
|
||||||
ld.Thearch.Minalign = MinAlign
|
ld.Thearch.Minalign = minAlign
|
||||||
ld.Thearch.Dwarfregsp = DWARFREGSP
|
ld.Thearch.Dwarfregsp = dwarfRegSP
|
||||||
ld.Thearch.Dwarfreglr = DWARFREGLR
|
ld.Thearch.Dwarfreglr = dwarfRegLR
|
||||||
|
|
||||||
ld.Thearch.Adddynrel = adddynrel
|
ld.Thearch.Adddynrel = adddynrel
|
||||||
ld.Thearch.Archinit = archinit
|
ld.Thearch.Archinit = archinit
|
||||||
|
@ -62,13 +62,13 @@ package s390x
|
|||||||
// THE SOFTWARE.
|
// THE SOFTWARE.
|
||||||
|
|
||||||
const (
|
const (
|
||||||
MaxAlign = 32 // max data alignment
|
maxAlign = 32 // max data alignment
|
||||||
MinAlign = 2 // min data alignment
|
minAlign = 2 // min data alignment
|
||||||
FuncAlign = 16
|
funcAlign = 16
|
||||||
)
|
)
|
||||||
|
|
||||||
/* Used by ../internal/ld/dwarf.go */
|
/* Used by ../internal/ld/dwarf.go */
|
||||||
const (
|
const (
|
||||||
DWARFREGSP = 15
|
dwarfRegSP = 15
|
||||||
DWARFREGLR = 14
|
dwarfRegLR = 14
|
||||||
)
|
)
|
||||||
|
@ -40,11 +40,11 @@ import (
|
|||||||
func Init() {
|
func Init() {
|
||||||
ld.SysArch = sys.ArchS390X
|
ld.SysArch = sys.ArchS390X
|
||||||
|
|
||||||
ld.Thearch.Funcalign = FuncAlign
|
ld.Thearch.Funcalign = funcAlign
|
||||||
ld.Thearch.Maxalign = MaxAlign
|
ld.Thearch.Maxalign = maxAlign
|
||||||
ld.Thearch.Minalign = MinAlign
|
ld.Thearch.Minalign = minAlign
|
||||||
ld.Thearch.Dwarfregsp = DWARFREGSP
|
ld.Thearch.Dwarfregsp = dwarfRegSP
|
||||||
ld.Thearch.Dwarfreglr = DWARFREGLR
|
ld.Thearch.Dwarfreglr = dwarfRegLR
|
||||||
|
|
||||||
ld.Thearch.Adddynrel = adddynrel
|
ld.Thearch.Adddynrel = adddynrel
|
||||||
ld.Thearch.Archinit = archinit
|
ld.Thearch.Archinit = archinit
|
||||||
|
@ -31,13 +31,13 @@
|
|||||||
package x86
|
package x86
|
||||||
|
|
||||||
const (
|
const (
|
||||||
MaxAlign = 32 // max data alignment
|
maxAlign = 32 // max data alignment
|
||||||
MinAlign = 1 // min data alignment
|
minAlign = 1 // min data alignment
|
||||||
FuncAlign = 16
|
funcAlign = 16
|
||||||
)
|
)
|
||||||
|
|
||||||
/* Used by ../internal/ld/dwarf.go */
|
/* Used by ../internal/ld/dwarf.go */
|
||||||
const (
|
const (
|
||||||
DWARFREGSP = 4
|
dwarfRegSP = 4
|
||||||
DWARFREGLR = 8
|
dwarfRegLR = 8
|
||||||
)
|
)
|
||||||
|
@ -40,11 +40,11 @@ import (
|
|||||||
func Init() {
|
func Init() {
|
||||||
ld.SysArch = sys.Arch386
|
ld.SysArch = sys.Arch386
|
||||||
|
|
||||||
ld.Thearch.Funcalign = FuncAlign
|
ld.Thearch.Funcalign = funcAlign
|
||||||
ld.Thearch.Maxalign = MaxAlign
|
ld.Thearch.Maxalign = maxAlign
|
||||||
ld.Thearch.Minalign = MinAlign
|
ld.Thearch.Minalign = minAlign
|
||||||
ld.Thearch.Dwarfregsp = DWARFREGSP
|
ld.Thearch.Dwarfregsp = dwarfRegSP
|
||||||
ld.Thearch.Dwarfreglr = DWARFREGLR
|
ld.Thearch.Dwarfreglr = dwarfRegLR
|
||||||
|
|
||||||
ld.Thearch.Adddynrel = adddynrel
|
ld.Thearch.Adddynrel = adddynrel
|
||||||
ld.Thearch.Archinit = archinit
|
ld.Thearch.Archinit = archinit
|
||||||
|
Loading…
Reference in New Issue
Block a user