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

Issue 4633043: code review 4633043: 8l/ld: Further adjustments for a port of Go to Plan 9 n... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 9 months ago by lucio
Modified:
13 years, 9 months ago
Reviewers:
CC:
rsc, golang-dev
Visibility:
Public.

Description

8l/ld: Further adjustments for a port of Go to Plan 9 native. Once these changes are effected, it is possible to construct "8l" native on a (386?) Plan 9 system, albeit with assistance from modules such as mkfiles that are not (yet) included in any public patches. 8l/asm.c: . Corrected some format qualifiers. 8l/list.c: . Cast a print() argument to (int) to match the given format. It may be possible to change the format (%R), but I have not looked into it. 8l/obj.c: . Removed some unused code. 8l/span.c: . Removed unnecessary incrementation on "bp". . Corrected some format qualifiers. ld/data.c: . Corrected some format qualifiers. . Cast print argument to (int): used as field size. . Use braces to suppress warning about empty if() statements. ld/dwarf.c: . Trivial spelling mistake in comment. ld/ldelf.c: . Added USED() statements to silence warnings. . Dropped redundant address (&) operators. . corrected some format qualifiers. . Cast to (int) for switch selection variable. ld/macho.c: . Added USED() statements to silence warnings. ld/ldpe.c: . Added USED() statements to silence warnings. . More careful use of "sect" variable. . Corrected some format qualifiers. . Removed redundant assignments. . Minor fix dropped as it was submitted separately. ld/pe.c: . Dropped <time.h> which is now in <u.h>. . Dropped redundant address (&) operators. . Added a missing variable initialisation. ld/symtab.c: . Added USED() statements to silence warnings. . Removed redundant incrementation. . Corrected some format qualifiers. All the above have been tested against a (very) recent release and do not seem to trigger any regressions. All review suggestions have been incorporated.

Patch Set 1 #

Patch Set 2 : diff -r dd3913e4b4b9 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r f5d2325ee229 https://go.googlecode.com/hg/ #

Total comments: 11

Patch Set 4 : diff -r 61ed63d57306 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -31 lines) Patch
M src/cmd/8l/asm.c View 1 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/8l/list.c View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/8l/obj.c View 1 2 chunks +0 lines, -2 lines 0 comments Download
M src/cmd/8l/pass.c View 1 1 chunk +0 lines, -1 line 0 comments Download
M src/cmd/8l/span.c View 1 2 chunks +2 lines, -2 lines 0 comments Download
M src/cmd/ld/data.c View 1 2 3 6 chunks +10 lines, -10 lines 0 comments Download
M src/cmd/ld/dwarf.c View 1 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/ld/ldelf.c View 1 2 3 2 chunks +4 lines, -3 lines 0 comments Download
M src/cmd/ld/ldmacho.c View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M src/cmd/ld/ldpe.c View 1 2 3 4 chunks +7 lines, -3 lines 0 comments Download
M src/cmd/ld/pe.c View 1 3 chunks +2 lines, -4 lines 0 comments Download
M src/cmd/ld/symtab.c View 1 5 chunks +8 lines, -3 lines 0 comments Download

Messages

Total messages: 7
lucio
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com, rsc@golang.org), I'd like you to review this change to https://go.googlecode.com/hg/
13 years, 9 months ago (2011-06-16 19:12:25 UTC) #1
rsc
Looks fine. A bunch of little things below. http://codereview.appspot.com/4633043/diff/5001/src/cmd/8l/list.c File src/cmd/8l/list.c (right): http://codereview.appspot.com/4633043/diff/5001/src/cmd/8l/list.c#newcode179 src/cmd/8l/list.c:179: sprint(s, ...
13 years, 9 months ago (2011-06-20 15:03:14 UTC) #2
lucio
> http://codereview.appspot.com/4633043/diff/5001/src/cmd/ld/ldelf.c#newcode475 > src/cmd/ld/ldelf.c:475: werrstr("shstrndx out of range %ud >= %d", > obj->shstrndx, obj->nsect); > ...
13 years, 9 months ago (2011-06-20 16:38:50 UTC) #3
rsc
On Mon, Jun 20, 2011 at 12:38, Lucio De Re <lucio.dere@gmail.com> wrote: >> http://codereview.appspot.com/4633043/diff/5001/src/cmd/ld/ldelf.c#newcode475 >> ...
13 years, 9 months ago (2011-06-20 17:09:20 UTC) #4
lucio
Hello rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 9 months ago (2011-06-21 05:47:11 UTC) #5
rsc
LGTM
13 years, 9 months ago (2011-06-21 16:13:56 UTC) #6
rsc
13 years, 9 months ago (2011-06-21 16:14:35 UTC) #7
*** Submitted as http://code.google.com/p/go/source/detail?r=e3c9fecaef4e ***

8l: more fixes for Plan 9

Once these changes are effected, it is possible to construct
"8l" native on a (386?) Plan 9 system, albeit with assistance
from modules such as mkfiles that are not (yet) included in any
public patches.

8l/asm.c:
. Corrected some format qualifiers.

8l/list.c:
. Cast a print() argument to (int) to match the given format.
  It may be possible to change the format (%R), but I have not
  looked into it.

8l/obj.c:
. Removed some unused code.

8l/span.c:
. Removed unnecessary incrementation on "bp".
. Corrected some format qualifiers.

ld/data.c:
. Corrected some format qualifiers.
. Cast print argument to (int): used as field size.
. Use braces to suppress warning about empty if() statements.

ld/dwarf.c:
. Trivial spelling mistake in comment.

ld/ldelf.c:
. Added USED() statements to silence warnings.
. Dropped redundant address (&) operators.
. corrected some format qualifiers.
. Cast to (int) for switch selection variable.

ld/macho.c:
. Added USED() statements to silence warnings.

ld/ldpe.c:
. Added USED() statements to silence warnings.
. More careful use of "sect" variable.
. Corrected some format qualifiers.
. Removed redundant assignments.
. Minor fix dropped as it was submitted separately.

ld/pe.c:
. Dropped <time.h> which is now in <u.h>.
. Dropped redundant address (&) operators.
. Added a missing variable initialisation.

ld/symtab.c:
. Added USED() statements to silence warnings.
. Removed redundant incrementation.
. Corrected some format qualifiers.

All the above have been tested against a (very) recent release
and do not seem to trigger any regressions.

All review suggestions have been incorporated.

R=rsc
CC=golang-dev
http://codereview.appspot.com/4633043

Committer: Russ Cox <rsc@golang.org>
Sign in to reply to this message.

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