Commit 3884f732 authored by Kai Backman's avatar Kai Backman

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
parent 718be321
......@@ -301,13 +301,14 @@ asmb(void)
wputl(5); /* # of Shdrs */
wputl(4); /* Shdr with strings */
fo = 0;
va = INITTEXT & ~((vlong)INITRND - 1);
w = HEADR+textsize;
fo = HEADR;
va = rnd(INITTEXT, INITRND);
w = textsize;
linuxphdr(1, /* text - type = PT_LOAD */
1L+4L, /* text - flags = PF_X+PF_R */
0, /* file offset */
fo, /* file offset */
va, /* vaddr */
va, /* paddr */
w, /* file size */
......@@ -360,7 +361,7 @@ asmb(void)
stroffset = 1; /* 0 means no name, so start at 1 */
fo = HEADR;
va = (INITTEXT & ~((vlong)INITRND - 1)) + HEADR;
va = rnd(INITTEXT, INITRND);
w = textsize;
linuxshdr(".text", /* name */
......
......@@ -19,10 +19,10 @@ Major changes include:
Original options are listed in the link above.
Options new in this version:
-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.
*/
package documentation
......@@ -80,7 +80,7 @@ linkername[] =
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();
}
......@@ -221,7 +221,7 @@ main(int argc, char *argv[])
case 6: /* arm elf */
HEADR = linuxheadr();
if(INITTEXT == -1)
INITTEXT = 0x8000+HEADR;
INITTEXT = 0x8000;
if(INITDAT == -1)
INITDAT = 0;
if(INITRND == -1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment