[dev.link] cmd/link: refactor dwarf gen methods to be comp-unit centric
[dev.link] cmd/link: refactor dwarf gen methods to be comp-unit centric

Refactor some of the linker's DWARF generation methods so as to have
helper routines that do all the work for a given comp unit for a given
section (range, loc, etc). No change in functionality, this is just a
reorg in preparation for a later patch in this sequence.

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

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