Commit 27a10f7d authored by David Crawshaw's avatar David Crawshaw

cmd/link: stop passing unused read_only_relocs

The external darwin linker has been printing:

	ld: warning: -read_only_relocs cannot be used with x86_64

for a long time. Now that it is printed by CL 33301, we may as
well get rid of it.

Fixes #20246

Change-Id: I1147cf1ff197fdfda228a1349f13627bcf9fc72f
Reviewed-on: https://go-review.googlesource.com/42730
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: 's avatarTodd Neal <todd@tneal.org>
Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 507f4d5f
......@@ -1075,7 +1075,10 @@ func (l *Link) hostlink() {
argv = append(argv, "-pie")
case BuildmodeCShared:
if Headtype == objabi.Hdarwin {
argv = append(argv, "-dynamiclib", "-Wl,-read_only_relocs,suppress")
argv = append(argv, "-dynamiclib")
if SysArch.Family != sys.AMD64 {
argv = append(argv, "-Wl,-read_only_relocs,suppress")
}
} else {
// ELF.
argv = append(argv, "-Wl,-Bsymbolic")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment