1
0
mirror of https://github.com/golang/go synced 2024-11-25 05:57:57 -07:00

6l, 8l: elfsetstring is only for .shstrtab

Was also recording for .dynstrtab which made the
table run out of space and would have caused confusion
if the ELF code tried to refer to any of the strings.

R=r
CC=golang-dev
https://golang.org/cl/2288041
This commit is contained in:
Russ Cox 2010-09-28 15:18:02 -04:00
parent a400b0e7d7
commit 2ccbf83b32
2 changed files with 4 additions and 2 deletions

View File

@ -138,7 +138,8 @@ addstring(Sym *s, char *str)
s->reachable = 1; s->reachable = 1;
r = s->size; r = s->size;
n = strlen(str)+1; n = strlen(str)+1;
elfsetstring(str, r); if(strcmp(s->name, ".shstrtab") == 0)
elfsetstring(str, r);
while(n > 0) { while(n > 0) {
m = n; m = n;
if(m > sizeof(p->to.scon)) if(m > sizeof(p->to.scon))

View File

@ -129,7 +129,8 @@ addstring(Sym *s, char *str)
s->reachable = 1; s->reachable = 1;
r = s->size; r = s->size;
n = strlen(str)+1; n = strlen(str)+1;
elfsetstring(str, r); if(strcmp(s->name, ".shstrtab") == 0)
elfsetstring(str, r);
while(n > 0) { while(n > 0) {
m = n; m = n;
if(m > sizeof(p->to.scon)) if(m > sizeof(p->to.scon))