]> Cypherpunks repositories - gostls13.git/commit
[dev.link] cmd/link: cleanup of attribute handling code
authorThan McIntosh <thanm@google.com>
Mon, 16 Mar 2020 17:56:42 +0000 (13:56 -0400)
committerThan McIntosh <thanm@google.com>
Wed, 18 Mar 2020 22:49:17 +0000 (22:49 +0000)
commit63ffa1595c874f61f641e4f1193eff0feb64dd51
treee759d4518a337b11c25e453caea106df51b3f19e
parent626c89bfa3596629b4aba737b1b5c3266e1a899e
[dev.link] cmd/link: cleanup of attribute handling code

Minor cleanup of symbol attributes. Specifically:

- if a symbol originally begins life as an object file symbol,
  then is converted to external in cloneToExternal, use the
  previously recorded object file index for the sym to figure
  out if it has read-only data (in the case that there is no
  entry for it in the map in question).

- remove SetAttrShared; only the loader should be populating this
  attribute at symbol creation (it never gets updated later)

- remove unused copyAttributes() method

- comment fixes

Change-Id: Iac7bc6ac310ec89bfe733ddc783970d2a8017478
Reviewed-on: https://go-review.googlesource.com/c/go/+/223667
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/link/internal/loader/loader.go