diff options
author | Edoardo Vacchi <[email protected]> | 2023-05-04 15:37:48 +0200 |
---|---|---|
committer | Ayke <[email protected]> | 2023-05-04 20:45:02 +0200 |
commit | 4e41e9084a6619500c419540b84fb8d1b068647a (patch) | |
tree | 08ed7f676e61d483a091fd0ef3c9bd38163cd139 | |
parent | ee3af40cab35ba2b8241138e67d3dc2fb7da4406 (diff) | |
download | tinygo-4e41e9084a6619500c419540b84fb8d1b068647a.tar.gz tinygo-4e41e9084a6619500c419540b84fb8d1b068647a.zip |
cgo: allow LDFLAGS: --export=...
Signed-off-by: Edoardo Vacchi <[email protected]>
-rw-r--r-- | cgo/security.go | 1 | ||||
-rw-r--r-- | cgo/security_test.go | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/cgo/security.go b/cgo/security.go index 2fea40c8a..a55a7d688 100644 --- a/cgo/security.go +++ b/cgo/security.go @@ -142,6 +142,7 @@ var validLinkerFlags = []*regexp.Regexp{ re(`-L([^@\-].*)`), re(`-O`), re(`-O([^@\-].*)`), + re(`--export=([^@\-].*)`), re(`-f(no-)?(pic|PIC|pie|PIE)`), re(`-f(no-)?openmp(-simd)?`), re(`-fsanitize=([^@\-].*)`), diff --git a/cgo/security_test.go b/cgo/security_test.go index 98fd25fb8..fb3bb9212 100644 --- a/cgo/security_test.go +++ b/cgo/security_test.go @@ -108,6 +108,7 @@ var goodLinkerFlags = [][]string{ {"-Fbar"}, {"-lbar"}, {"-Lbar"}, + {"--export=my_symbol"}, {"-fpic"}, {"-fno-pic"}, {"-fPIC"}, |