1
0
mirror of https://github.com/golang/go synced 2024-11-22 02:14:40 -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,6 +138,7 @@ 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;
if(strcmp(s->name, ".shstrtab") == 0)
elfsetstring(str, r); elfsetstring(str, r);
while(n > 0) { while(n > 0) {
m = n; m = n;

View File

@ -129,6 +129,7 @@ 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;
if(strcmp(s->name, ".shstrtab") == 0)
elfsetstring(str, r); elfsetstring(str, r);
while(n > 0) { while(n > 0) {
m = n; m = n;