mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/internal/ld: add -buildmode=c-shared as an alternative to -shared
The linker currently (on some platforms) takes a -shared flag, which means approximately what -buildmode=c-shared means in the in the proposed "Go Execution Modes" document. As part of implementing other modes, the term "shared" becomes horribly overloaded, so this replaces -shared with a -buildmode argument instead (which currently only handles -buildmode=c-shared and the default -buildmode=exe -- no new behaviour here). As the linker support for -shared was in 1.4 this retains it as an alias. Change-Id: Id2ebb8e05ee07f46208a554bc2622d0e67b47082 Reviewed-on: https://go-review.googlesource.com/8304 Reviewed-by: David Crawshaw <crawshaw@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
47746f10fe
commit
2a5f88d850
8 changed files with 67 additions and 15 deletions
|
|
@ -1658,7 +1658,7 @@ func doelf() {
|
|||
Addstring(shstrtab, ".note.GNU-stack")
|
||||
}
|
||||
|
||||
if Flag_shared != 0 {
|
||||
if Buildmode == BuildmodeCShared {
|
||||
Addstring(shstrtab, ".init_array")
|
||||
switch Thearch.Thechar {
|
||||
case '6', '7', '9':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue