This trivial change reduces the size of cmd/go by 88K.
For #6853
For #36313
Change-Id: I5e74acf118bd1c63cbdd256879d8aa8d72a50505
Reviewed-on: https://go-review.googlesource.com/c/go/+/727021
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
keep = false
}
lsym.Set(obj.AttrMakeTypelink, keep)
+ lsym.Align = int16(types.PtrSize)
return lsym
}
etypedesc := md.types + md.typedesclen
for td < etypedesc {
- // TODO: The fact that type descriptors are aligned to
- // 0x20 does not make sense.
- if GOARCH == "arm" {
- td = alignUp(td, 0x8)
- } else if GOOS == "aix" {
- // The alignment of 8 is forced in the linker on AIX.
- td = alignUp(td, 0x8)
- } else {
- td = alignUp(td, 0x20)
- }
+ td = alignUp(td, goarch.PtrSize)
typ := (*_type)(unsafe.Pointer(td))
ret = append(ret, typ)