elfwritedynentsym(s, DT_REL, lookup(".rel", 0));
elfwritedynentsymsize(s, DT_RELSZ, lookup(".rel", 0));
elfwritedynent(s, DT_RELENT, ELF32RELSIZE);
+ if(rpath)
+ elfwritedynent(s, DT_RUNPATH, addstring(dynstr, rpath));
elfwritedynent(s, DT_NULL, 0);
}
}
-L dir1,dir2,..
Search for libraries (package files) in the comma-separated list of directories.
The default is the single location $GOROOT/pkg/$GOOS_arm.
+-r dir1:dir2:...
+ Set the dynamic linker search path when using ELF.
-V
Print the linker version.
EXTERN char* outfile;
EXTERN int32 pc;
EXTERN uchar repop[ALAST];
+EXTERN char* rpath;
EXTERN uint32 stroffset;
EXTERN int32 symsize;
EXTERN Prog* textp;
void
usage(void)
{
- fprint(2, "usage: 5l [-E entry] [-H head] [-L dir] [-T text] [-D data] [-R rnd] [-o out] main.5\n");
+ fprint(2, "usage: 5l [-E entry] [-H head] [-L dir] [-T text] [-D data] [-R rnd] [-r path] [-o out] main.5\n");
errorexit();
}
case 'R':
INITRND = atolwhex(EARGF(usage()));
break;
+ case 'r':
+ rpath = EARGF(usage());
+ break;
case 'H':
HEADTYPE = atolwhex(EARGF(usage()));
/* do something about setting INITTEXT */
elfwritedynentsym(s, DT_RELA, lookup(".rela", 0));
elfwritedynentsymsize(s, DT_RELASZ, lookup(".rela", 0));
elfwritedynent(s, DT_RELAENT, ELF64RELASIZE);
+ if(rpath)
+ elfwritedynent(s, DT_RUNPATH, addstring(dynstr, rpath));
elfwritedynent(s, DT_NULL, 0);
}
}
-L dir1,dir2,..
Search for libraries (package files) in the comma-separated list of directories.
The default is the single location $GOROOT/pkg/$GOOS_amd64.
+-r dir1:dir2:...
+ Set the dynamic linker search path when using ELF.
-V
Print the linker version.
EXTERN char* noname;
EXTERN char* outfile;
EXTERN vlong pc;
+EXTERN char* rpath;
EXTERN int32 spsize;
EXTERN Sym* symlist;
EXTERN int32 symsize;
void
usage(void)
{
- fprint(2, "usage: 6l [-options] [-E entry] [-H head] [-L dir] [-T text] [-R rnd] [-o out] main.6\n");
+ fprint(2, "usage: 6l [-options] [-E entry] [-H head] [-L dir] [-T text] [-R rnd] [-r path] [-o out] main.6\n");
exits("usage");
}
case 'R':
INITRND = atolwhex(EARGF(usage()));
break;
+ case 'r':
+ rpath = EARGF(usage());
+ break;
case 'x': /* produce export table */
doexp = 1;
if(argv[1] != nil && argv[1][0] != '-' && !isobjfile(argv[1]))
elfwritedynentsym(s, DT_REL, lookup(".rel", 0));
elfwritedynentsymsize(s, DT_RELSZ, lookup(".rel", 0));
elfwritedynent(s, DT_RELENT, ELF32RELSIZE);
+ if(rpath)
+ elfwritedynent(s, DT_RUNPATH, addstring(dynstr, rpath));
elfwritedynent(s, DT_NULL, 0);
}
}
-L dir1,dir2,..
Search for libraries (package files) in the comma-separated list of directories.
The default is the single location $GOROOT/pkg/$GOOS_386.
+-r dir1:dir2:...
+ Set the dynamic linker search path when using ELF.
-V
Print the linker version.
EXTERN int nerrors;
EXTERN char* noname;
EXTERN int32 pc;
+EXTERN char* rpath;
EXTERN int32 spsize;
EXTERN Sym* symlist;
EXTERN int32 symsize;
void
usage(void)
{
- fprint(2, "usage: 8l [-options] [-E entry] [-H head] [-L dir] [-T text] [-R rnd] [-o out] main.8\n");
+ fprint(2, "usage: 8l [-options] [-E entry] [-H head] [-L dir] [-T text] [-R rnd] [-r path] [-o out] main.8\n");
exits("usage");
}
case 'R':
INITRND = atolwhex(EARGF(usage()));
break;
+ case 'r':
+ rpath = EARGF(usage());
break;
case 'x': /* produce export table */
doexp = 1;