1
0
mirror of https://github.com/golang/go synced 2024-11-20 04:54:44 -07:00

cmd/5l, cmd/6l, cmd/8l: fix function symbol generation from gcc compiled source code

For CL 6853059.

R=jsing, rsc
CC=golang-dev
https://golang.org/cl/6938076
This commit is contained in:
Shenghou Ma 2012-12-18 23:17:39 +08:00
parent 7777bac6e4
commit c0927a6797
3 changed files with 3 additions and 3 deletions

View File

@ -450,7 +450,7 @@ adddynsym(Sym *s)
/* type */
t = STB_GLOBAL << 4;
if(s->dynexport && s->type == STEXT)
if(s->dynexport && (s->type&SMASK) == STEXT)
t |= STT_FUNC;
else
t |= STT_OBJECT;

View File

@ -455,7 +455,7 @@ adddynsym(Sym *s)
adduint32(d, addstring(lookup(".dynstr", 0), name));
/* type */
t = STB_GLOBAL << 4;
if(s->dynexport && s->type == STEXT)
if(s->dynexport && (s->type&SMASK) == STEXT)
t |= STT_FUNC;
else
t |= STT_OBJECT;

View File

@ -447,7 +447,7 @@ adddynsym(Sym *s)
/* type */
t = STB_GLOBAL << 4;
if(s->dynexport && s->type == STEXT)
if(s->dynexport && (s->type&SMASK) == STEXT)
t |= STT_FUNC;
else
t |= STT_OBJECT;