mirror of
https://github.com/golang/go
synced 2024-11-21 20:14:52 -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:
parent
a400b0e7d7
commit
2ccbf83b32
@ -138,7 +138,8 @@ addstring(Sym *s, char *str)
|
||||
s->reachable = 1;
|
||||
r = s->size;
|
||||
n = strlen(str)+1;
|
||||
elfsetstring(str, r);
|
||||
if(strcmp(s->name, ".shstrtab") == 0)
|
||||
elfsetstring(str, r);
|
||||
while(n > 0) {
|
||||
m = n;
|
||||
if(m > sizeof(p->to.scon))
|
||||
|
@ -129,7 +129,8 @@ addstring(Sym *s, char *str)
|
||||
s->reachable = 1;
|
||||
r = s->size;
|
||||
n = strlen(str)+1;
|
||||
elfsetstring(str, r);
|
||||
if(strcmp(s->name, ".shstrtab") == 0)
|
||||
elfsetstring(str, r);
|
||||
while(n > 0) {
|
||||
m = n;
|
||||
if(m > sizeof(p->to.scon))
|
||||
|
Loading…
Reference in New Issue
Block a user