]> Cypherpunks repositories - gostls13.git/commitdiff
go linux x86-64 kernel fixes:
authorRuss Cox <rsc@golang.org>
Mon, 8 Sep 2008 22:22:55 +0000 (15:22 -0700)
committerRuss Cox <rsc@golang.org>
Mon, 8 Sep 2008 22:22:55 +0000 (15:22 -0700)
* change .gosymtab and .gopclntab to section 7 (note)
* start INITTEXT at 4MB, not 4KB

R=r
OCL=14953
CL=14959

src/cmd/6l/asm.c
src/cmd/6l/obj.c

index 53e39ac40afc3272128c2c7c9cdceb90c50bc03c..86832286452eabc401aa49bddc9672fe979f2778 100644 (file)
@@ -426,7 +426,7 @@ asmb(void)
                wputl(4);                       /* Shdr with strings */
 
                fo = 0;
-               va = INITRND;
+               va = INITTEXT & ~((vlong)INITRND - 1);
                w = HEADR+textsize;
 
                linuxphdr(1,                    /* text - type = PT_LOAD */
@@ -537,7 +537,7 @@ asmb(void)
                w = symsize;
 
                linuxshdr(".gosymtab",          /* name */
-                       2,                      /* type */
+                       7,                      /* type */
                        0,                      /* flags */
                        0,                      /* addr */
                        fo,                     /* off */
@@ -551,7 +551,7 @@ asmb(void)
                w = lcsize;
 
                linuxshdr(".gopclntab",         /* name */
-                       2,                      /* type */
+                       7,                      /* type */
                        0,                      /* flags */
                        0,                      /* addr */
                        fo,                     /* off */
index 47c0280de57e1df37b7b6016956d23687670738e..1b57687ea70654ab7e776067a6fc49c82329318d 100644 (file)
@@ -198,7 +198,7 @@ main(int argc, char *argv[])
        case 7: /* elf64 executable */
                HEADR = linuxheadr();
                if(INITTEXT == -1)
-                       INITTEXT = 4096+HEADR;
+                       INITTEXT = (1<<22)+HEADR;
                if(INITDAT == -1)
                        INITDAT = 0;
                if(INITRND == -1)