mirror of
https://github.com/golang/go
synced 2024-11-20 10:14:43 -07:00
ld: drop rpath
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
This commit is contained in:
parent
193709736f
commit
afac1c2654
@ -41,7 +41,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
char *noname = "<none>";
|
char *noname = "<none>";
|
||||||
char thechar = '5';
|
|
||||||
char *thestring = "arm";
|
char *thestring = "arm";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -133,8 +132,6 @@ main(int argc, char *argv[])
|
|||||||
usage();
|
usage();
|
||||||
|
|
||||||
libinit();
|
libinit();
|
||||||
if(rpath == nil)
|
|
||||||
rpath = smprint("%s/pkg/%s_%s", goroot, goos, goarch);
|
|
||||||
|
|
||||||
if(!debug['9'] && !debug['U'] && !debug['B'])
|
if(!debug['9'] && !debug['U'] && !debug['B'])
|
||||||
debug[DEFAULT] = 1;
|
debug[DEFAULT] = 1;
|
||||||
@ -265,6 +262,7 @@ main(int argc, char *argv[])
|
|||||||
follow();
|
follow();
|
||||||
softfloat();
|
softfloat();
|
||||||
noops();
|
noops();
|
||||||
|
dostkcheck();
|
||||||
span();
|
span();
|
||||||
pclntab();
|
pclntab();
|
||||||
symtab();
|
symtab();
|
||||||
|
@ -40,7 +40,6 @@
|
|||||||
#include <ar.h>
|
#include <ar.h>
|
||||||
|
|
||||||
char *noname = "<none>";
|
char *noname = "<none>";
|
||||||
char thechar = '6';
|
|
||||||
char* thestring = "amd64";
|
char* thestring = "amd64";
|
||||||
char* paramspace = "FP";
|
char* paramspace = "FP";
|
||||||
|
|
||||||
@ -123,8 +122,6 @@ main(int argc, char *argv[])
|
|||||||
usage();
|
usage();
|
||||||
|
|
||||||
libinit();
|
libinit();
|
||||||
if(rpath == nil)
|
|
||||||
rpath = smprint("%s/pkg/%s_%s", goroot, goos, goarch);
|
|
||||||
|
|
||||||
if(HEADTYPE == -1) {
|
if(HEADTYPE == -1) {
|
||||||
HEADTYPE = 2;
|
HEADTYPE = 2;
|
||||||
@ -255,6 +252,7 @@ main(int argc, char *argv[])
|
|||||||
if(HEADTYPE == 6)
|
if(HEADTYPE == 6)
|
||||||
domacho();
|
domacho();
|
||||||
dostkoff();
|
dostkoff();
|
||||||
|
dostkcheck();
|
||||||
paramspace = "SP"; /* (FP) now (SP) on output */
|
paramspace = "SP"; /* (FP) now (SP) on output */
|
||||||
if(debug['p'])
|
if(debug['p'])
|
||||||
if(debug['1'])
|
if(debug['1'])
|
||||||
|
@ -44,7 +44,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
char *noname = "<none>";
|
char *noname = "<none>";
|
||||||
char thechar = '8';
|
|
||||||
char *thestring = "386";
|
char *thestring = "386";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -161,8 +160,6 @@ main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
libinit();
|
libinit();
|
||||||
if(rpath == nil)
|
|
||||||
rpath = smprint("%s/pkg/%s_%s", goroot, goos, goarch);
|
|
||||||
|
|
||||||
switch(HEADTYPE) {
|
switch(HEADTYPE) {
|
||||||
default:
|
default:
|
||||||
|
@ -276,7 +276,6 @@ asmbmacho(void)
|
|||||||
vlong v, w;
|
vlong v, w;
|
||||||
vlong va;
|
vlong va;
|
||||||
int a, i;
|
int a, i;
|
||||||
char *pkgroot;
|
|
||||||
MachoHdr *mh;
|
MachoHdr *mh;
|
||||||
MachoSect *msect;
|
MachoSect *msect;
|
||||||
MachoSeg *ms;
|
MachoSeg *ms;
|
||||||
@ -428,12 +427,6 @@ asmbmacho(void)
|
|||||||
ml->data[0] = 12; /* offset to string */
|
ml->data[0] = 12; /* offset to string */
|
||||||
strcpy((char*)&ml->data[1], "/usr/lib/dyld");
|
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++) {
|
for(i=0; i<ndylib; i++) {
|
||||||
ml = newMachoLoad(12, 4+(strlen(dylib[i])+1+7)/8*2); /* LC_LOAD_DYLIB */
|
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 */
|
ml->data[0] = 24; /* offset of string from beginning of load */
|
||||||
|
Loading…
Reference in New Issue
Block a user