]> Cypherpunks repositories - gostls13.git/commit
cmd/gc: implement -pack flag
authorRuss Cox <rsc@golang.org>
Wed, 18 Dec 2013 02:43:33 +0000 (21:43 -0500)
committerRuss Cox <rsc@golang.org>
Wed, 18 Dec 2013 02:43:33 +0000 (21:43 -0500)
commitb02233402961621e1cd705d79dcf63387daadea2
treea9cd225a70bc87fc9f64700b94f1f7630b51b93d
parentdeb554934c0c2a87b24f4eb29cdcbbd4ea68a6d6
cmd/gc: implement -pack flag

The -pack flag causes 5g, 6g, 8g to write a Go archive directly,
instead of requiring the use of 'go tool pack' to convert the .5/.6/.8
to .a format.

Writing directly avoids the copy and also avoids having the
export data stored twice in the archive (once in __.PKGDEF,
once in .5/.6/.8).

A separate CL will enable the use of this flag by cmd/go.

Other build systems that do not know about -pack will be unaffected.

The changes to cmd/ld handle a minor simplification to the format:
an unused section is removed.

R=iant, r
CC=golang-dev
https://golang.org/cl/42880043
src/cmd/gc/export.c
src/cmd/gc/go.h
src/cmd/gc/lex.c
src/cmd/gc/obj.c
src/cmd/ld/go.c
src/cmd/ld/lib.c