mirror of
https://github.com/golang/go
synced 2024-11-22 00:44:39 -07:00
salvaging 183105 from dead client
a number of fixes for arm elf generation in 5l. -T now works as advertised, -D now works properly. R=rsc CC=golang-dev https://golang.org/cl/194076
This commit is contained in:
parent
718be3215f
commit
3884f7321f
@ -301,13 +301,14 @@ asmb(void)
|
|||||||
wputl(5); /* # of Shdrs */
|
wputl(5); /* # of Shdrs */
|
||||||
wputl(4); /* Shdr with strings */
|
wputl(4); /* Shdr with strings */
|
||||||
|
|
||||||
fo = 0;
|
fo = HEADR;
|
||||||
va = INITTEXT & ~((vlong)INITRND - 1);
|
va = rnd(INITTEXT, INITRND);
|
||||||
w = HEADR+textsize;
|
|
||||||
|
w = textsize;
|
||||||
|
|
||||||
linuxphdr(1, /* text - type = PT_LOAD */
|
linuxphdr(1, /* text - type = PT_LOAD */
|
||||||
1L+4L, /* text - flags = PF_X+PF_R */
|
1L+4L, /* text - flags = PF_X+PF_R */
|
||||||
0, /* file offset */
|
fo, /* file offset */
|
||||||
va, /* vaddr */
|
va, /* vaddr */
|
||||||
va, /* paddr */
|
va, /* paddr */
|
||||||
w, /* file size */
|
w, /* file size */
|
||||||
@ -360,7 +361,7 @@ asmb(void)
|
|||||||
|
|
||||||
stroffset = 1; /* 0 means no name, so start at 1 */
|
stroffset = 1; /* 0 means no name, so start at 1 */
|
||||||
fo = HEADR;
|
fo = HEADR;
|
||||||
va = (INITTEXT & ~((vlong)INITRND - 1)) + HEADR;
|
va = rnd(INITTEXT, INITRND);
|
||||||
w = textsize;
|
w = textsize;
|
||||||
|
|
||||||
linuxshdr(".text", /* name */
|
linuxshdr(".text", /* name */
|
||||||
|
@ -19,10 +19,10 @@ Major changes include:
|
|||||||
Original options are listed in the link above.
|
Original options are listed in the link above.
|
||||||
|
|
||||||
Options new in this version:
|
Options new in this version:
|
||||||
|
|
||||||
-L dir1,dir2,..
|
-L dir1,dir2,..
|
||||||
Search for libraries (package files) in the comma-separated list of directories.
|
Search for libraries (package files) in the comma-separated list of directories.
|
||||||
The default is the single location $GOROOT/pkg/$GOOS_arm.
|
The default is the single location $GOROOT/pkg/$GOOS_arm.
|
||||||
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
package documentation
|
package documentation
|
||||||
|
@ -80,7 +80,7 @@ linkername[] =
|
|||||||
void
|
void
|
||||||
usage(void)
|
usage(void)
|
||||||
{
|
{
|
||||||
fprint(2, "usage: 5l [-options] main.5\n");
|
fprint(2, "usage: 5l [-E entry] [-H head] [-L dir] [-T text] [-D data] [-R rnd] [-o out] main.5\n");
|
||||||
errorexit();
|
errorexit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -221,7 +221,7 @@ main(int argc, char *argv[])
|
|||||||
case 6: /* arm elf */
|
case 6: /* arm elf */
|
||||||
HEADR = linuxheadr();
|
HEADR = linuxheadr();
|
||||||
if(INITTEXT == -1)
|
if(INITTEXT == -1)
|
||||||
INITTEXT = 0x8000+HEADR;
|
INITTEXT = 0x8000;
|
||||||
if(INITDAT == -1)
|
if(INITDAT == -1)
|
||||||
INITDAT = 0;
|
INITDAT = 0;
|
||||||
if(INITRND == -1)
|
if(INITRND == -1)
|
||||||
|
Loading…
Reference in New Issue
Block a user