mirror of https://github.com/golang/go.git
cmd/internal/ld: emit macho .init_array section
Change-Id: Ie75a01e899e68f4f9643410f5e161152a81b8ba0 Reviewed-on: https://go-review.googlesource.com/8655 Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
8e6cf5f70c
commit
47746f10fe
|
|
@ -390,6 +390,11 @@ func machoshbits(mseg *MachoSeg, sect *Section, segname string) {
|
|||
msect.flag = 6 /* section with nonlazy symbol pointers */
|
||||
msect.res1 = uint32(Linklookup(Ctxt, ".linkedit.plt", 0).Size / 4) /* offset into indirect symbol table */
|
||||
}
|
||||
|
||||
if sect.Name == ".init_array" {
|
||||
msect.name = "__mod_init_func"
|
||||
msect.flag = 9 // S_MOD_INIT_FUNC_POINTERS
|
||||
}
|
||||
}
|
||||
|
||||
func Asmbmacho() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue