cmd/link: set S_ATTR_PURE_INSTRUCTIONS bit for text section on darwin
Mac otool and llvm-objdump distinguishes a Mach-O section is text or data by looking at S_ATTR_PURE_INSTRUCTIONS bit. Without this bit it thinks our function symbols are data, not functions. Set this bit for text section to make otool/objdump happy. Fixes #24706. Change-Id: I5236482cb9a72474c23fbea0f35d5b5cc8491ea4 Reviewed-on: https://go-review.googlesource.com/105256 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Showing
Please
register
or
sign in
to comment