1
0
mirror of https://github.com/golang/go synced 2024-11-23 19:40:08 -07:00

cmd/compile, cmd/link: remove unused fields from relocations

Reduces size of archives in pkg/linux_amd64 by 3% from 41.5MB to 40.2MB

Change-Id: Id64ca7995de8dd84c9e7ce1985730927cf4bfd66
Reviewed-on: https://go-review.googlesource.com/20912
Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
Shahar Kohanim 2016-03-20 09:44:18 +02:00 committed by David Crawshaw
parent 3504945081
commit 78fc59ef42
3 changed files with 0 additions and 10 deletions

View File

@ -635,9 +635,7 @@ func (r *objReader) parseObject(prefix []byte) error {
rel.Size = r.readInt()
rel.Type = r.readInt()
rel.Add = r.readInt()
r.readInt() // Xadd - ignored
rel.Sym = r.readSymID()
r.readSymID() // Xsym - ignored
}
if s.Kind == STEXT {

View File

@ -70,9 +70,7 @@
// - siz [int]
// - type [int]
// - add [int]
// - xadd [int]
// - sym [symref index]
// - xsym [symref index]
//
// Each local has the encoding:
//
@ -492,9 +490,7 @@ func writesym(ctxt *Link, b *Biobuf, s *LSym) {
wrint(b, int64(r.Siz))
wrint(b, int64(r.Type))
wrint(b, r.Add)
wrint(b, 0) // Xadd, ignored
wrsym(b, r.Sym)
wrsym(b, nil) // Xsym, ignored
}
if s.Type == STEXT {

View File

@ -72,9 +72,7 @@ package ld
// - siz [int]
// - type [int]
// - add [int]
// - xadd [int]
// - sym [symref index]
// - xsym [symref index]
//
// Each local has the encoding:
//
@ -250,9 +248,7 @@ overwrite:
r.Siz = rduint8(f)
r.Type = rdint32(f)
r.Add = rdint64(f)
rdint64(f) // Xadd, ignored
r.Sym = rdsym(ctxt, f, pkg)
rdsym(ctxt, f, pkg) // Xsym, ignored
}
}