Commit 78fc59ef authored by Shahar Kohanim's avatar Shahar Kohanim Committed by David Crawshaw

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/20912Reviewed-by: default avatarDavid Crawshaw <crawshaw@golang.org>
parent 35049450
...@@ -635,9 +635,7 @@ func (r *objReader) parseObject(prefix []byte) error { ...@@ -635,9 +635,7 @@ func (r *objReader) parseObject(prefix []byte) error {
rel.Size = r.readInt() rel.Size = r.readInt()
rel.Type = r.readInt() rel.Type = r.readInt()
rel.Add = r.readInt() rel.Add = r.readInt()
r.readInt() // Xadd - ignored
rel.Sym = r.readSymID() rel.Sym = r.readSymID()
r.readSymID() // Xsym - ignored
} }
if s.Kind == STEXT { if s.Kind == STEXT {
......
...@@ -70,9 +70,7 @@ ...@@ -70,9 +70,7 @@
// - siz [int] // - siz [int]
// - type [int] // - type [int]
// - add [int] // - add [int]
// - xadd [int]
// - sym [symref index] // - sym [symref index]
// - xsym [symref index]
// //
// Each local has the encoding: // Each local has the encoding:
// //
...@@ -492,9 +490,7 @@ func writesym(ctxt *Link, b *Biobuf, s *LSym) { ...@@ -492,9 +490,7 @@ func writesym(ctxt *Link, b *Biobuf, s *LSym) {
wrint(b, int64(r.Siz)) wrint(b, int64(r.Siz))
wrint(b, int64(r.Type)) wrint(b, int64(r.Type))
wrint(b, r.Add) wrint(b, r.Add)
wrint(b, 0) // Xadd, ignored
wrsym(b, r.Sym) wrsym(b, r.Sym)
wrsym(b, nil) // Xsym, ignored
} }
if s.Type == STEXT { if s.Type == STEXT {
......
...@@ -72,9 +72,7 @@ package ld ...@@ -72,9 +72,7 @@ package ld
// - siz [int] // - siz [int]
// - type [int] // - type [int]
// - add [int] // - add [int]
// - xadd [int]
// - sym [symref index] // - sym [symref index]
// - xsym [symref index]
// //
// Each local has the encoding: // Each local has the encoding:
// //
...@@ -250,9 +248,7 @@ overwrite: ...@@ -250,9 +248,7 @@ overwrite:
r.Siz = rduint8(f) r.Siz = rduint8(f)
r.Type = rdint32(f) r.Type = rdint32(f)
r.Add = rdint64(f) r.Add = rdint64(f)
rdint64(f) // Xadd, ignored
r.Sym = rdsym(ctxt, f, pkg) r.Sym = rdsym(ctxt, f, pkg)
rdsym(ctxt, f, pkg) // Xsym, ignored
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment