Commit e9073ef8 authored by ng0's avatar ng0 Committed by Ian Lance Taylor

cmd/go: accept -Wl,-R/path/

Fixes #32167

Change-Id: If1277789ac96363430045e73e49d008bdae9be79
GitHub-Last-Rev: 71c9435c8417b19faaf66dc2e08740d7a9c22e3b
GitHub-Pull-Request: golang/go#32171
Reviewed-on: https://go-review.googlesource.com/c/go/+/178397
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent fc705275
......@@ -184,6 +184,8 @@ var validLinkerFlags = []*lazyregexp.Regexp{
re(`-Wl,-framework,[^,@\-][^,]+`),
re(`-Wl,-headerpad_max_install_names`),
re(`-Wl,--no-undefined`),
re(`-Wl,-R([^@\-][^,@]*$)`),
re(`-Wl,--just-symbols[=,]([^,@\-][^,@]+)`),
re(`-Wl,-rpath(-link)?[=,]([^,@\-][^,]+)`),
re(`-Wl,-s`),
re(`-Wl,-search_paths_first`),
......@@ -213,6 +215,8 @@ var validLinkerFlagsWithNextArg = []string{
"-target",
"-Wl,-framework",
"-Wl,-rpath",
"-Wl,-R",
"-Wl,--just-symbols",
"-Wl,-undefined",
}
......
......@@ -125,6 +125,11 @@ var goodLinkerFlags = [][]string{
{"-pthread"},
{"-Wl,-rpath,foo"},
{"-Wl,-rpath,$ORIGIN/foo"},
{"-Wl,-R", "/foo"},
{"-Wl,-R", "foo"},
{"-Wl,-R,foo"},
{"-Wl,--just-symbols=foo"},
{"-Wl,--just-symbols,foo"},
{"-Wl,--warn-error"},
{"-Wl,--no-warn-error"},
{"foo.so"},
......@@ -197,6 +202,9 @@ var badLinkerFlags = [][]string{
{"-x", "--c"},
{"-x", "@obj"},
{"-Wl,-rpath,@foo"},
{"-Wl,-R,foo,bar"},
{"-Wl,-R,@foo"},
{"-Wl,--just-symbols,@foo"},
{"../x.o"},
}
......
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