Commit 2ccbf83b authored by Russ Cox's avatar Russ Cox

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
parent a400b0e7
......@@ -138,6 +138,7 @@ addstring(Sym *s, char *str)
s->reachable = 1;
r = s->size;
n = strlen(str)+1;
if(strcmp(s->name, ".shstrtab") == 0)
elfsetstring(str, r);
while(n > 0) {
m = n;
......
......@@ -129,6 +129,7 @@ addstring(Sym *s, char *str)
s->reachable = 1;
r = s->size;
n = strlen(str)+1;
if(strcmp(s->name, ".shstrtab") == 0)
elfsetstring(str, r);
while(n > 0) {
m = n;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment