[dev.link] cmd/link: separate out DWARF processing from dodata's allocateSections
[dev.link] cmd/link: separate out DWARF processing from dodata's allocateSections

Split out DWARF symbol-to-section assignment into its own separate
helper routine, to improve readability. No change in functionality.

Change-Id: Ic2e4f4d99afbff65161cbb8bd63e866ea555f322
Reviewed-on: https://go-review.googlesource.com/c/go/+/228957
Reviewed-by: Cherry Zhang <d62e63aa42ce272d7b6a5055d97e942b33a34679@google.com>
Reviewed-by: Jeremy Faller <b3f594e10a9edcf5413cf1190121d45078c62290@golang.org>

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