]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/link: remove outdated cast and comment
authorDavid Crawshaw <crawshaw@golang.org>
Tue, 6 Sep 2016 16:33:36 +0000 (12:33 -0400)
committerDavid Crawshaw <crawshaw@golang.org>
Tue, 6 Sep 2016 17:21:22 +0000 (17:21 +0000)
This program is written in Go now.

Change-Id: Ieec21a1bcac7c7a59e88cd1e1359977659de1757
Reviewed-on: https://go-review.googlesource.com/28549
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/link/internal/ld/data.go

index 9c0daa1f3fe1823568ab808405be278a453810e4..ba36210c614aa210090bb271bbd32eb6e8a4b931 100644 (file)
@@ -586,13 +586,7 @@ func relocsym(ctxt *Link, s *Symbol) {
                                o += Symaddr(ctxt, r.Sym)
                        }
 
-                       // NOTE: The (int32) cast on the next line works around a bug in Plan 9's 8c
-                       // compiler. The expression s->value + r->off + r->siz is int32 + int32 +
-                       // uchar, and Plan 9 8c incorrectly treats the expression as type uint32
-                       // instead of int32, causing incorrect values when sign extended for adding
-                       // to o. The bug only occurs on Plan 9, because this C program is compiled by
-                       // the standard host compiler (gcc on most other systems).
-                       o += r.Add - (s.Value + int64(r.Off) + int64(int32(r.Siz)))
+                       o += r.Add - (s.Value + int64(r.Off) + int64(r.Siz))
 
                case obj.R_SIZE:
                        o = r.Sym.Size + r.Add