[dev.link] cmd/link: new loader method for reading relocations in batch
[dev.link] cmd/link: new loader method for reading relocations in batch

Add a new loader.Relocs method that reads all of the relocations for a
symbol into a slice. Handy in cases where the client knows in advance
that it wants to visit all the relocations on a symbol (as opposed to
just one or two).

Change-Id: I1a420513e160c8bb4b90c9824ae8d5b5de060c15
Reviewed-on: https://go-review.googlesource.com/c/go/+/201721
Run-TryBot: Than McIntosh <4b2922593166fc595a9b1a408f34f5d3817fe9d2@google.com>
TryBot-Result: Gobot Gobot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>
Reviewed-by: Jeremy Faller <b3f594e10a9edcf5413cf1190121d45078c62290@golang.org>
Reviewed-by: Cherry Zhang <d62e63aa42ce272d7b6a5055d97e942b33a34679@google.com>

akutz/go,CAFxX/go,nawawi/go,cloudflare/go,cloudflare/go,akutz/go,cloudflare/go,CAFxX/go,nawawi/go,akutz/go,akutz/go,akutz/go,cloudflare/go,CAFxX/go,golang/go,CAFxX/go,CAFxX/go,golang/go,akutz/go,nawawi/go,golang/go,cloudflare/go,akutz/go,golang/go,cloudflare/go,golang/go,golang/go,cloudflare/go,akutz/go,cloudflare/go,nawawi/go,nawawi/go,CAFxX/go,CAFxX/go,nawawi/go,golang/go,golang/go,nawawi/go,nawawi/go,CAFxX/go