Skip to content

Latest commit

 

History

History
36 lines (26 loc) · 564 Bytes

File metadata and controls

36 lines (26 loc) · 564 Bytes

go-plugins-cgo-with-same-symbol-names

Example demonstrate using go plugins that statically linked C libraries with CGO with same symbol names with using -fvisibility=hidden GCC flag

golang/go#42854

Build

make

Clean

make clean

Output

./main
Load Go plugin hello1.so
Load Go plugin hello2.so

Call Go plugin hello1.go
Hello from Go plugin hello1.go
Call C hello1.c
Hello from C hello1.c

Call Go plugin hello2.go
Hello from Go plugin hello2.go
Call С hello2.c
Hello from C hello2.c