Commit c0927a67 authored by Shenghou Ma's avatar Shenghou Ma

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
parent 7777bac6
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
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