]> Cypherpunks repositories - gostls13.git/commitdiff
Bug fix. Without rounding, .shstrtab is written on top of data segment
authorRob Pike <r@golang.org>
Fri, 13 Jun 2008 01:51:06 +0000 (18:51 -0700)
committerRob Pike <r@golang.org>
Fri, 13 Jun 2008 01:51:06 +0000 (18:51 -0700)
SVN=122567

src/cmd/6l/asm.c

index c3a615dabab42cca16029f587a685fcf2ba5273c..bae36b9b56363f8271d373c7c0fd9ee6e0891d47 100644 (file)
@@ -226,7 +226,7 @@ debug['s'] = 1;
                        break;
                case 7:
 debug['s'] = 1;
-                       seek(cout, HEADR+textsize+datsize, 0);
+                       seek(cout, rnd(HEADR+textsize, INITRND)+datsize, 0);
                        linuxstrtable();
                        break;
                case 6:
@@ -498,7 +498,6 @@ w = bsssize;
                        8,                      /* align */
                        0);                     /* entsize */
 
-fo = HEADR+textsize+datsize;
 w = stroffset +
        strlen(".shstrtab")+1;
 //     strlen(".gosymtab")+1;