]> Cypherpunks repositories - gostls13.git/commitdiff
ld: drop rpath
authorRuss Cox <rsc@golang.org>
Fri, 18 Feb 2011 16:35:36 +0000 (11:35 -0500)
committerRuss Cox <rsc@golang.org>
Fri, 18 Feb 2011 16:35:36 +0000 (11:35 -0500)
Was required by old cgo but we don't
generate stub .so files anymore.

Update #1527.

R=iant
CC=golang-dev
https://golang.org/cl/4168056

src/cmd/5l/obj.c
src/cmd/6l/obj.c
src/cmd/8l/obj.c
src/cmd/ld/macho.c

index 5b778d7772d85967eaf89191c4ccf9deb1b0321b..b976e300bce607ebfc38ed0fd71c23cebbc1df31 100644 (file)
@@ -41,7 +41,6 @@
 #endif
 
 char   *noname         = "<none>";
-char   thechar         = '5';
 char   *thestring      = "arm";
 
 /*
@@ -133,8 +132,6 @@ main(int argc, char *argv[])
                usage();
 
        libinit();
-       if(rpath == nil)
-               rpath = smprint("%s/pkg/%s_%s", goroot, goos, goarch);
 
        if(!debug['9'] && !debug['U'] && !debug['B'])
                debug[DEFAULT] = 1;
@@ -265,6 +262,7 @@ main(int argc, char *argv[])
        follow();
        softfloat();
        noops();
+       dostkcheck();
        span();
        pclntab();
        symtab();
index f9e257842794e514c8cdf90dbb068279db6b0f87..3dabb4c178df9f9fba618d38a7ad07e82c8c9e1e 100644 (file)
@@ -40,7 +40,6 @@
 #include       <ar.h>
 
 char   *noname         = "<none>";
-char   thechar         = '6';
 char*  thestring       = "amd64";
 char*  paramspace      = "FP";
 
@@ -123,8 +122,6 @@ main(int argc, char *argv[])
                usage();
 
        libinit();
-       if(rpath == nil)
-               rpath = smprint("%s/pkg/%s_%s", goroot, goos, goarch);
 
        if(HEADTYPE == -1) {
                HEADTYPE = 2;
@@ -255,6 +252,7 @@ main(int argc, char *argv[])
        if(HEADTYPE == 6)
                domacho();
        dostkoff();
+       dostkcheck();
        paramspace = "SP";      /* (FP) now (SP) on output */
        if(debug['p'])
                if(debug['1'])
index 9c687f2fc25917ea5733020e776605003b9ba70e..fb97e8426611097df65e47f3b1d9718a26e3c29b 100644 (file)
@@ -44,7 +44,6 @@
 #endif
 
 char   *noname         = "<none>";
-char   thechar         = '8';
 char   *thestring      = "386";
 
 /*
@@ -161,8 +160,6 @@ main(int argc, char *argv[])
        }
 
        libinit();
-       if(rpath == nil)
-               rpath = smprint("%s/pkg/%s_%s", goroot, goos, goarch);
 
        switch(HEADTYPE) {
        default:
index 402e0ec63dd17f1b2cbd430c20bef72639ddf080..c8d7c4a6d9dc5708bacbf11627228a5caf63288a 100644 (file)
@@ -276,7 +276,6 @@ asmbmacho(void)
        vlong v, w;
        vlong va;
        int a, i;
-       char *pkgroot;
        MachoHdr *mh;
        MachoSect *msect;
        MachoSeg *ms;
@@ -428,12 +427,6 @@ asmbmacho(void)
                ml->data[0] = 12;       /* offset to string */
                strcpy((char*)&ml->data[1], "/usr/lib/dyld");
 
-               if(ndylib > 0) {        /* add reference to where .so files are installed */
-                       pkgroot = smprint("%s/pkg/%s_%s", goroot, goos, goarch);
-                       ml = newMachoLoad(0x80000000 | 0x1c, 1+(strlen(pkgroot)+1+7)/8*2);      /* LC_RPATH */
-                       ml->data[0] = 12;       /* offset of string from beginning of load */
-                       strcpy((char*)&ml->data[1], pkgroot);
-               }
                for(i=0; i<ndylib; i++) {
                        ml = newMachoLoad(12, 4+(strlen(dylib[i])+1+7)/8*2);    /* LC_LOAD_DYLIB */
                        ml->data[0] = 24;       /* offset of string from beginning of load */