Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1)

Issue 42880043: code review 42880043: cmd/gc: implement -pack flag (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 7 months ago by rsc
Modified:
11 years, 7 months ago
Reviewers:
iant
CC:
iant, r, golang-dev
Visibility:
Public.

Description

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.

Patch Set 1 #

Patch Set 2 : diff -r 4dd891cd0a26 https://code.google.com/p/go/ #

Patch Set 3 : diff -r 4dd891cd0a26 https://code.google.com/p/go/ #

Total comments: 4

Patch Set 4 : diff -r e4cdf4d18e1e https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+71 lines, -41 lines) Patch
M src/cmd/gc/export.c View 1 2 chunks +2 lines, -3 lines 0 comments Download
M src/cmd/gc/go.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/cmd/gc/lex.c View 1 2 chunks +7 lines, -5 lines 0 comments Download
M src/cmd/gc/obj.c View 1 2 3 3 chunks +50 lines, -2 lines 0 comments Download
M src/cmd/ld/go.c View 1 2 1 chunk +2 lines, -19 lines 0 comments Download
M src/cmd/ld/lib.c View 1 2 1 chunk +9 lines, -12 lines 0 comments Download

Messages

Total messages: 4
rsc
Hello iant, r (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go/
11 years, 7 months ago (2013-12-16 18:08:06 UTC) #1
iant
LGTM https://codereview.appspot.com/42880043/diff/40001/src/cmd/gc/obj.c File src/cmd/gc/obj.c (right): https://codereview.appspot.com/42880043/diff/40001/src/cmd/gc/obj.c#newcode23 src/cmd/gc/obj.c:23: snprint(arhdr, ArhdrSize, "%-16s%-12d%-6d%-6d%-8o%-10d`", The current go pack writes ...
11 years, 7 months ago (2013-12-16 20:57:51 UTC) #2
rsc
https://codereview.appspot.com/42880043/diff/40001/src/cmd/gc/obj.c File src/cmd/gc/obj.c (right): https://codereview.appspot.com/42880043/diff/40001/src/cmd/gc/obj.c#newcode23 src/cmd/gc/obj.c:23: snprint(arhdr, ArhdrSize, "%-16s%-12d%-6d%-6d%-8o%-10d`", On 2013/12/16 20:57:52, iant wrote: > ...
11 years, 7 months ago (2013-12-18 02:31:09 UTC) #3
rsc
11 years, 7 months ago (2013-12-18 02:43:38 UTC) #4
*** Submitted as https://code.google.com/p/go/source/detail?r=92e348edc9ce ***

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://codereview.appspot.com/42880043
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b