mirror of
https://github.com/golang/go
synced 2024-11-22 05:04:40 -07:00
5l, 6l, 8l: correct ELFRESERVE diagnostic
If the length of the interpreter string pushes us over the ELFRESERVE limit, the resulting error message will be comical. I was doing some ELF tinkering with a modified version of 8l when I hit this. To be clear, the stock linkers wouldn't hit this without adding about forty more section headers. We're safe for now. ;) Also, remove a redundant call to cflush. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5268044
This commit is contained in:
parent
4566868b41
commit
033585d675
@ -632,8 +632,8 @@ asmb(void)
|
|||||||
a += elfwritehdr();
|
a += elfwritehdr();
|
||||||
a += elfwritephdrs();
|
a += elfwritephdrs();
|
||||||
a += elfwriteshdrs();
|
a += elfwriteshdrs();
|
||||||
cflush();
|
a += elfwriteinterp();
|
||||||
if(a+elfwriteinterp() > ELFRESERVE)
|
if(a > ELFRESERVE)
|
||||||
diag("ELFRESERVE too small: %d > %d", a, ELFRESERVE);
|
diag("ELFRESERVE too small: %d > %d", a, ELFRESERVE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1095,8 +1095,8 @@ asmb(void)
|
|||||||
a += elfwritehdr();
|
a += elfwritehdr();
|
||||||
a += elfwritephdrs();
|
a += elfwritephdrs();
|
||||||
a += elfwriteshdrs();
|
a += elfwriteshdrs();
|
||||||
cflush();
|
a += elfwriteinterp();
|
||||||
if(a+elfwriteinterp() > ELFRESERVE)
|
if(a > ELFRESERVE)
|
||||||
diag("ELFRESERVE too small: %d > %d", a, ELFRESERVE);
|
diag("ELFRESERVE too small: %d > %d", a, ELFRESERVE);
|
||||||
break;
|
break;
|
||||||
case Hwindows:
|
case Hwindows:
|
||||||
|
@ -1160,8 +1160,8 @@ asmb(void)
|
|||||||
a += elfwritehdr();
|
a += elfwritehdr();
|
||||||
a += elfwritephdrs();
|
a += elfwritephdrs();
|
||||||
a += elfwriteshdrs();
|
a += elfwriteshdrs();
|
||||||
cflush();
|
a += elfwriteinterp();
|
||||||
if(a+elfwriteinterp() > ELFRESERVE)
|
if(a > ELFRESERVE)
|
||||||
diag("ELFRESERVE too small: %d > %d", a, ELFRESERVE);
|
diag("ELFRESERVE too small: %d > %d", a, ELFRESERVE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user