Default symbol could break loading multiple shared lib implemented by 
different version of go runtime,
if there is one symbol with same name but with different logic.

And, the shared lib implemented by Go has too many symbols from the Go 
runtine and libraries, which will result in the loading performance.

On Tuesday, March 21, 2017 at 7:09:06 AM UTC+8, Ian Lance Taylor wrote:
>
> On Mon, Mar 20, 2017 at 4:51 AM, Song Liu <song...@gmail.com <javascript:>> 
> wrote: 
> > 
> > I am going to write a shared library using the Go, you know that the Go 
> > runtime and used libraries are compiled into the library together. 
> > 
> > But it seems that all the symbols from this library is "DEFAULT", is 
> there a 
> > way to use the "HIDDEN" symbol visibility by default, but "DEFAULT" only 
> for 
> > the API exposed by this library. 
> > 
> > This is could be done in c/c++ via. the 
> "__attribute__(visibility(default))" 
> > and "-fvisiblity=hidden", what will do in CGO ? 
>
> No, this is not currently available in Go. 
>
> It's not clear to me that anybody would actually want this, as having 
> multiple copies of a hidden symbol would then to break things. 
>
> Ian 
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to