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

Issue 98290043: code review 98290043: cmd/ld: correct size rounding for NetBSD ELF NOTEs. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years ago by minux1
Modified:
9 years, 11 months ago
Reviewers:
iant
CC:
golang-codereviews
Visibility:
Public.

Description

cmd/ld: correct size rounding for NetBSD ELF NOTEs.

Patch Set 1 #

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

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

Total comments: 2

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M src/cmd/ld/elf.c View 1 2 3 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 2
minux1
Hello iant@golang.org (cc: golang-codereviews@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go
10 years ago (2014-05-15 22:07:29 UTC) #1
iant
10 years ago (2014-05-15 22:52:37 UTC) #2
https://codereview.appspot.com/98290043/diff/30002/src/cmd/ld/elf.c
File src/cmd/ld/elf.c (right):

https://codereview.appspot.com/98290043/diff/30002/src/cmd/ld/elf.c#newcode330
src/cmd/ld/elf.c:330: sh->size = n - resoff % 4;
This does not look right.  The size of the section really should be the length
of the interpreter.  We could round up the value we return if necessary.

https://codereview.appspot.com/98290043/diff/30002/src/cmd/ld/elf.c#newcode391
src/cmd/ld/elf.c:391: n = rnd(ELF_NOTE_NETBSD_NAMESZ, 4) +
rnd(ELF_NOTE_NETBSD_DESCSZ, 4);
I think it would make more sense to write
    n = rnd(ELF_NOTE_NETBSD_NAMESZ + ELF_NOTE_NETBSD_DESCSZ, 4)
Either way, though, doesn't it produce exactly the same result?
Sign in to reply to this message.

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