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

Issue 6086043: code review 6086043: cmd/cgo, cmd/go: detect dynamic linker automatically (Closed)

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

Description

cmd/cgo, cmd/cc, cmd/ld: detect dynamic linker automatically Some newer Linux distributions (Ubuntu ARM at least) use a new multiarch directory organization, where dynamic linker is no longer in the hardcoded path in our linker. For example, Ubuntu 12.04 ARM hardfloat places its dynamic linker at /lib/arm-linux-gnueabihf/ld-linux.so.3 Ref: http://lackof.org/taggart/hacking/multiarch/ Also, to support Debian GNU/kFreeBSD as a FreeBSD variant, we need this capability, so it's part of issue 3533. This CL add a new pragma (#pragma dynlinker "path") to cc.

Patch Set 1 #

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

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

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

Total comments: 2

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

Patch Set 6 : diff -r 9233f811c522 https://code.google.com/p/go/ #

Patch Set 7 : diff -r e388ce51be75 https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+113 lines, -2 lines) Patch
M src/cmd/5c/swt.c View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M src/cmd/5l/obj.c View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M src/cmd/6c/swt.c View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M src/cmd/6l/obj.c View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M src/cmd/8c/swt.c View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M src/cmd/8l/obj.c View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M src/cmd/cc/cc.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M src/cmd/cc/dpchk.c View 1 2 3 1 chunk +17 lines, -0 lines 0 comments Download
M src/cmd/cc/lexbody View 1 2 3 1 chunk +7 lines, -0 lines 0 comments Download
M src/cmd/cc/macbody View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M src/cmd/cgo/out.go View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download
M src/cmd/ld/go.c View 1 2 3 4 4 chunks +62 lines, -2 lines 0 comments Download

Messages

Total messages: 13
minux1
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go/
12 years, 11 months ago (2012-04-20 11:56:49 UTC) #1
iant
LGTM but wait for rsc.
12 years, 11 months ago (2012-04-20 15:49:36 UTC) #2
rsc
This seems okay but how do we get from here to 6l using the right ...
12 years, 11 months ago (2012-04-20 16:46:27 UTC) #3
minux1
On Sat, Apr 21, 2012 at 12:46 AM, Russ Cox <rsc@golang.org> wrote: > This seems ...
12 years, 11 months ago (2012-04-20 16:52:40 UTC) #4
minux1
On 2012/04/20 16:52:40, minux wrote: > On Sat, Apr 21, 2012 at 12:46 AM, Russ ...
12 years, 11 months ago (2012-04-20 17:27:01 UTC) #5
minux1
On Sat, Apr 21, 2012 at 1:27 AM, <minux.ma@gmail.com> wrote: > > when linking programs ...
12 years, 11 months ago (2012-04-20 17:34:40 UTC) #6
rsc
On Fri, Apr 20, 2012 at 13:27, <minux.ma@gmail.com> wrote: > That is, we move the ...
12 years, 10 months ago (2012-04-25 03:16:40 UTC) #7
minux1
On Wed, Apr 25, 2012 at 11:16 AM, Russ Cox <rsc@golang.org> wrote: > On Fri, ...
12 years, 10 months ago (2012-04-25 08:48:07 UTC) #8
rsc
On Wed, Apr 25, 2012 at 4:47 AM, minux <minux.ma@gmail.com> wrote: > BTW, do you ...
12 years, 10 months ago (2012-05-02 01:46:39 UTC) #9
minux1
On Wed, May 2, 2012 at 9:46 AM, Russ Cox <rsc@golang.org> wrote: > On Wed, ...
12 years, 10 months ago (2012-05-03 09:07:06 UTC) #10
minux1
On 2012/04/25 03:16:40, rsc wrote: > Adding a new #pragma here seems like the right ...
12 years, 10 months ago (2012-05-03 10:57:18 UTC) #11
rsc
LGTM Thanks! The $$ note applies to all three compilers. http://codereview.appspot.com/6086043/diff/14001/src/cmd/8c/swt.c File src/cmd/8c/swt.c (right): http://codereview.appspot.com/6086043/diff/14001/src/cmd/8c/swt.c#newcode267 ...
12 years, 10 months ago (2012-05-03 21:30:38 UTC) #12
minux1
12 years, 10 months ago (2012-05-04 17:54:38 UTC) #13
*** Submitted as http://code.google.com/p/go/source/detail?r=d744d86bd5ea ***

cmd/cgo, cmd/cc, cmd/ld: detect dynamic linker automatically
Some newer Linux distributions (Ubuntu ARM at least) use a new multiarch
directory organization, where dynamic linker is no longer in the hardcoded
path in our linker.
For example, Ubuntu 12.04 ARM hardfloat places its dynamic linker at
/lib/arm-linux-gnueabihf/ld-linux.so.3

Ref: http://lackof.org/taggart/hacking/multiarch/

Also, to support Debian GNU/kFreeBSD as a FreeBSD variant, we need this
capability, so it's part of issue 3533.

This CL add a new pragma (#pragma dynlinker "path") to cc.

R=iant, rsc
CC=golang-dev
http://codereview.appspot.com/6086043
Sign in to reply to this message.

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