]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/link: remove elfsetstring out of the loader
authorCherry Mui <cherryyz@google.com>
Thu, 4 May 2023 21:09:49 +0000 (17:09 -0400)
committerCherry Mui <cherryyz@google.com>
Fri, 5 May 2023 19:20:01 +0000 (19:20 +0000)
commitf90bb8a38f2f1ed2109f8fa88fb90a5c2db1f3fe
treecece8ec0b7f198ee24034f36848dee831a131211
parent26899ef3ee7cd3d9e663e6f792c93bb411c863db
cmd/link: remove elfsetstring out of the loader

Currently, we pass elfsetstring to the loader as a callback, for
a special case of Addstring. This is only used for ELF when adding
strings to the section header string table. Move the logic to the
caller instead, so the loader would not have this special case.

Change-Id: Icfb91f380fe4ba435985c3019681597932f58242
Reviewed-on: https://go-review.googlesource.com/c/go/+/492718
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
src/cmd/link/internal/ld/data_test.go
src/cmd/link/internal/ld/dwarf.go
src/cmd/link/internal/ld/elf.go
src/cmd/link/internal/ld/lib.go
src/cmd/link/internal/loader/loader.go
src/cmd/link/internal/loader/loader_test.go
src/cmd/link/internal/loader/symbolbuilder.go