Fixes #48112
Change-Id: I673a5fe61171e5ba3d8ce58daac79391fb4758f9
Reviewed-on: https://go-review.googlesource.com/c/go/+/346872
Trust: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
ph := newElfPhdr()
ph.Type = elf.PT_SUNWSTACK
ph.Flags = elf.PF_W + elf.PF_R
+ } else if ctxt.HeadType == objabi.Hfreebsd {
+ ph := newElfPhdr()
+ ph.Type = elf.PT_GNU_STACK
+ ph.Flags = elf.PF_W + elf.PF_R
+ ph.Align = uint64(ctxt.Arch.RegSize)
}
elfobj: