cmd/ld: fix operator precedence

LGTM=rsc
R=gobot, dave
CC=golang-codereviews, iant, rsc
https://codereview.appspot.com/114420043

Committer: Dave Cheney <dave@cheney.net>
cmd/ld: fix operator precedence

Fixes issue 8480.

This CL reapplies CL 114420043. This attempt doesn't blow up when encountering hidden symbols.

LGTM=minux
R=minux
CC=golang-codereviews
https://codereview.appspot.com/128310043