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

Issue 129540043: code review 129540043: liblink: introduce way to avoid pc-relative addressing (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 8 months ago by rsc
Modified:
10 years, 8 months ago
Reviewers:
aram, dave
CC:
iant, dave_cheney.net, golang-codereviews
Visibility:
Public.

Description

liblink: introduce way to avoid pc-relative addressing For Solaris. Sigh.

Patch Set 1 #

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

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

Total comments: 2

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

Patch Set 5 : diff -r 6199473fbef3d74e3a8ea8b537c78437888f7c3c https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+31 lines, -4 lines) Patch
M src/liblink/asm6.c View 1 2 3 6 chunks +31 lines, -4 lines 0 comments Download

Messages

Total messages: 10
rsc
Hello aram (cc: golang-codereviews@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go/
10 years, 8 months ago (2014-08-24 03:57:05 UTC) #1
iant
https://codereview.appspot.com/129540043/diff/40001/src/liblink/asm6.c File src/liblink/asm6.c (right): https://codereview.appspot.com/129540043/diff/40001/src/liblink/asm6.c#newcode1547 src/liblink/asm6.c:1547: return strcmp(s->name, "runtime.main") == 0 || strcmp(s->name, "runtime·gomaxprocs") == ...
10 years, 8 months ago (2014-08-25 01:44:08 UTC) #2
rsc
https://codereview.appspot.com/129540043/diff/40001/src/liblink/asm6.c File src/liblink/asm6.c (right): https://codereview.appspot.com/129540043/diff/40001/src/liblink/asm6.c#newcode1547 src/liblink/asm6.c:1547: return strcmp(s->name, "runtime.main") == 0 || strcmp(s->name, "runtime·gomaxprocs") == ...
10 years, 8 months ago (2014-08-25 02:04:13 UTC) #3
iant
On 2014/08/25 02:04:13, rsc wrote: > > > This function should return true for a ...
10 years, 8 months ago (2014-08-25 02:46:15 UTC) #4
aram
>> This function should return true for a symbol that is defined in >> some ...
10 years, 8 months ago (2014-08-25 09:36:42 UTC) #5
rsc
On Mon, Aug 25, 2014 at 5:36 AM, <aram@mgk.ro> wrote: > This function should return ...
10 years, 8 months ago (2014-08-25 16:14:01 UTC) #6
rsc
Hello aram@mgk.ro, iant@golang.org (cc: golang-codereviews@googlegroups.com), Please take another look.
10 years, 8 months ago (2014-08-25 16:15:51 UTC) #7
dave_cheney.net
LGTM. Thanks Russ, this has fixed the solaris/amd64 builder. On Tue, Aug 26, 2014 at ...
10 years, 8 months ago (2014-08-25 21:57:08 UTC) #8
rsc
*** Submitted as https://code.google.com/p/go/source/detail?r=02fc3509db71 *** liblink: introduce way to avoid pc-relative addressing For Solaris. Sigh. ...
10 years, 8 months ago (2014-08-25 22:45:33 UTC) #9
aram
10 years, 8 months ago (2014-08-27 13:26:27 UTC) #10
Message was sent while issue was closed.
Thanks for fixing this while I was gone.

> It's not too hard except that cgo seems to be working on every other
> system, so I still think there's something anomalous about Solaris
> that is the fundamental problem here.

I am very confused by this statement. I don't understand why you
mentioned cgo. The Solaris and Windows ports doesn't use cgo in the
regular sense; yes, they use code and infrastructure that was written
for cgo, but the actual mechanism is quite different (and much
simpler).

In particular, "real" cgo-enabled code uses gcc to generate the
machine code that accesses functions in shared libraries (i.e. what
was broken here). This is true even with internal linking. For
comparison, in "faux"-cgo used by Windows and Solaris, this code
is generated by 6l.

Since with "real" cgo, this type of machine code is written by gcc,
not 6l, I don't understand the relevancy of the fact that cgo is
working on every other platform, but I admit I might be missing the
larger issue here.

That being said, I am certain Solaris-specific bugs might be lurking
in liblink/6l. I will try to find and fix any inconsistency and
idiosyncrasy.

> I don't know the details of how Solaris differs from Windows.
> Obviously it is only approximately the same. :-)

The input is the same, the output is obviously different, but there
should be an isomorphism between the transformations. Since this
doesn't seem the case, it probably means there's a bug somewhere.
I will hunt it down.
Sign in to reply to this message.

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