aboutsummaryrefslogtreecommitdiff
path: root/_content/doc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2025-12-11 15:24:01 -0800
committerGopher Robot <gobot@golang.org>2025-12-11 19:35:31 -0800
commitd9959d5c8039914f2aff7ee4e0c4bb732d93708f (patch)
tree9cd1bbd682e4b3de4b20171acd0ad32b0dcc747a /_content/doc
parentc0c5893de85080ac440f36c3e18a67a6435f742f (diff)
downloadgo-x-website-d9959d5c8039914f2aff7ee4e0c4bb732d93708f.tar.xz
doc/go1.26: add notes about linker changes
For golang/go#75005 For golang/go#76038 Change-Id: I1c5925e71c0c84d1e1ed2ec9e493e14056f22b44 Reviewed-on: https://go-review.googlesource.com/c/website/+/729520 Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Keith Randall <khr@golang.org> Auto-Submit: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to '_content/doc')
-rw-r--r--_content/doc/go1.26.md28
1 files changed, 28 insertions, 0 deletions
diff --git a/_content/doc/go1.26.md b/_content/doc/go1.26.md
index cb1371c6..044dad1f 100644
--- a/_content/doc/go1.26.md
+++ b/_content/doc/go1.26.md
@@ -207,6 +207,34 @@ On 64-bit ARM-based Windows (the `windows/arm64` port), the linker now supports
linking mode of cgo programs, which can be requested with the
`-ldflags=-linkmode=internal` flag.
+There are several minor changes to executable files. These changes do
+not affect running Go programs. They may affect programs that analyze
+Go executables, and they may affect people who use external linking
+mode with custom linker scripts.
+
+ - The `moduledata` structure is now in its own section, named
+ `go.module`.
+ - The `moduledata` `cutab` field, which is a slice, now has the
+ correct length; previously the length was four times too large.
+ - The `pcHeader` found at the start of the `.gopclntab` section no
+ longer records the start of the text section. That field is now
+ always zero.
+ - That `pcHeader` change was made so that the `.gopclntab` section
+ no longer contains any relocations. On platforms that support
+ relro, the section has moved from the relro segment to the rodata
+ segment.
+ - The funcdata symbols and the findfunctab have moved from the
+ `.rodata` section to the `.gopclntab` section.
+ - The `.gosymtab` section has been removed. It was previously always
+ present but empty.
+ - When using internal linking, ELF sections now appear in the
+ section header list sorted by address. The previous order was
+ somewhat unpredictable.
+
+The references to section names here use the ELF names as seen on
+Linux and other systems. The Mach-O names as seen on Darwin start with
+a double underscore and do not contain any dots.
+
## Bootstrap {#bootstrap}
<!-- go.dev/issue/69315 -->