Commit ff2ab299 authored by Shenghou Ma's avatar Shenghou Ma Committed by Russ Cox

[release-branch.go1.4] cmd/ld: put .bss from external objects into real .bss section

Fixes #9359.

Change-Id: Iba62935b5a14de23d914f433a09a40417d7e88ed
Signed-off-by: default avatarShenghou Ma <minux@golang.org>
Reviewed-on: https://go-review.googlesource.com/1889Reviewed-by: default avatarRuss Cox <rsc@golang.org>
Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
(cherry picked from commit 1c0c611f)
Reviewed-on: https://go-review.googlesource.com/2802Reviewed-by: default avatarAndrew Gerrand <adg@golang.org>
parent 6609baf2
......@@ -539,7 +539,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