]> Cypherpunks repositories - gostls13.git/commit
cmd/link: add runtime.text.N symbols to Mach-O symbol table
authorCherry Mui <cherryyz@google.com>
Wed, 29 Sep 2021 20:47:12 +0000 (16:47 -0400)
committerCherry Mui <cherryyz@google.com>
Thu, 30 Sep 2021 16:43:32 +0000 (16:43 +0000)
commit9112d296e84315a07d76a24874037448e2affdd7
tree1311878b8fd98bcb2e91695e78eab0ae6fd2411c
parentd4aed7e42cd187c3031350489dba814f29f215a5
cmd/link: add runtime.text.N symbols to Mach-O symbol table

On Darwin/ARM64 when external linking, for very large text we
split it into multiple sections. For each section (other than the
first) we create runtime.text.N marker symbols. In CL 316050 I
forgot to add those symbols to the symbol table. This CL does it.

It doesn't actually matter for program execution. But we add them
on ELF when splitting text sections, so we do it here as well.
Also, this makes it easier to tell if we split text sections.

Change-Id: Ida7f8e9431867881e5ee2bc1a2129eeaf83cb878
Reviewed-on: https://go-review.googlesource.com/c/go/+/353209
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
src/cmd/link/internal/ld/ld_test.go
src/cmd/link/internal/ld/macho.go