1
0
mirror of https://github.com/golang/go synced 2024-11-23 14:40:02 -07:00

cmd/go: accept hash-style in LDFLAGS

Change-Id: I493bb7e5e9a9e1752236dea1e032b317da7f67f1
Reviewed-on: https://go-review.googlesource.com/c/go/+/211560
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Meng Zhuo 2019-12-18 22:41:10 +08:00 committed by Ian Lance Taylor
parent 05e3ad3897
commit 5d9549debb
2 changed files with 3 additions and 0 deletions

View File

@ -186,6 +186,7 @@ var validLinkerFlags = []*lazyregexp.Regexp{
re(`-Wl,--(no-)?export-dynamic`),
re(`-Wl,-E`),
re(`-Wl,-framework,[^,@\-][^,]+`),
re(`-Wl,--hash-style=(sysv|gnu|both)`),
re(`-Wl,-headerpad_max_install_names`),
re(`-Wl,--no-undefined`),
re(`-Wl,-R([^@\-][^,@]*$)`),

View File

@ -131,6 +131,7 @@ var goodLinkerFlags = [][]string{
{"-mtune=happybirthday"},
{"-pic"},
{"-pthread"},
{"-Wl,--hash-style=both"},
{"-Wl,-rpath,foo"},
{"-Wl,-rpath,$ORIGIN/foo"},
{"-Wl,-R", "/foo"},
@ -208,6 +209,7 @@ var badLinkerFlags = [][]string{
{"-Wl,-framework", "-Wl,@Home"},
{"-Wl,-framework", "@Home"},
{"-Wl,-framework,Chocolate,@Home"},
{"-Wl,--hash-style=foo"},
{"-x", "--c"},
{"-x", "@obj"},
{"-Wl,-rpath,@foo"},