Commit 1c0c611f authored by Shenghou Ma's avatar Shenghou Ma Committed by Minux Ma

cmd/ld: put .bss from external objects into real .bss section

Fixes #9359.

Change-Id: Iba62935b5a14de23d914f433a09a40417d7e88ed
Signed-off-by: 's avatarShenghou Ma <minux@golang.org>
Reviewed-on: https://go-review.googlesource.com/1889Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
parent ce9a4afa
......@@ -545,7 +545,10 @@ ldelf(Biobuf *f, char *pkg, int64 len, char *pn)
s->type = SRODATA;
break;
case ElfSectFlagAlloc + ElfSectFlagWrite:
s->type = SNOPTRDATA;
if(sect->type == ElfSectNobits)
s->type = SNOPTRBSS;
else
s->type = SNOPTRDATA;
break;
case ElfSectFlagAlloc + ElfSectFlagExec:
s->type = STEXT;
......
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