Commit 47746f10 authored by David Crawshaw's avatar David Crawshaw

cmd/internal/ld: emit macho .init_array section

Change-Id: Ie75a01e899e68f4f9643410f5e161152a81b8ba0
Reviewed-on: https://go-review.googlesource.com/8655Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
parent 8e6cf5f7
......@@ -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() {
......
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