cmd/link: eliminate a couple of unused DWARF attrs
cmd/link: eliminate a couple of unused DWARF attrs

The linker's DWARF generation occasionally computes and attaches an
attribute X to a type even though the type's abbrev doesn't have the
specified attr. For example, the DW_TAG_subroutine_type abbrev entry
has no type attribute, but a type attr is given to it (wasting
memory). Similarly there are some places where a byte size attr is
added to a DIE whose abbrev lacks that attr. This patch trims away a
few of these not-needed attrs, saving some very tiny amount of memory.

Updates #26186

Change-Id: I69e853df468ac54b07772a614b4106d7c4dae01d
Reviewed-on: https://go-review.googlesource.com/123296
Reviewed-by: Heschi Kreinick <e89ab2b172855aa0ad01c40c4d8a3535a61ac68a@google.com>
Run-TryBot: Heschi Kreinick <e89ab2b172855aa0ad01c40c4d8a3535a61ac68a@google.com>
TryBot-Result: Gobot Gobot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>

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