]> Cypherpunks repositories - gostls13.git/commit
[dev.link] cmd/link: move more error handling into loader
authorThan McIntosh <thanm@google.com>
Wed, 22 Apr 2020 19:16:06 +0000 (15:16 -0400)
committerThan McIntosh <thanm@google.com>
Fri, 24 Apr 2020 13:41:49 +0000 (13:41 +0000)
commit3d1007d28e92316b08974dc65cde44a6aa31bf21
tree9adad11a2dad0c02902bd6e99bf2b7a4f46df6af
parent442fd182fba66a11f9cbe3321217e8b4618fcfc7
[dev.link] cmd/link: move more error handling into loader

Move the guts of ctxt.Errorf into loader.Loader, so that we can make
calls to it from functions that have a "*loader.Loader" available but
not a "ctxt *Link". This is needed to start converting hooks like
"adddynrel" in the arch-specific portions of the linker to use loader
APIs.

Change-Id: Ieedd4583b66504be0e77d7f3fbadafe0d2307a69
Reviewed-on: https://go-review.googlesource.com/c/go/+/229497
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
src/cmd/link/internal/ld/errors.go
src/cmd/link/internal/ld/lib.go
src/cmd/link/internal/ld/sym.go
src/cmd/link/internal/ld/util.go
src/cmd/link/internal/loader/loader.go
src/cmd/link/internal/loader/loader_test.go