I'd like to package `a` and `c` into the shared library, and put `b` and `splitlib` into the binary.
I've tried the following:
$ go install -buildmode=shared std
$ go install -buildmode=shared -linkshared -gcflags='-N -l' ./a
Then
$ go build -o main -linkshared -gcflags='-N -l' .
This produced `main` in the current directory that only links to a shared libstd, but not to
the freshly built lib...splitlib-a.so:
$ ldd main
linux-vdso.so.1 (0x00007ffea3bfe000)
libstd.so => /usr/local/go/pkg/linux_amd64_dynlink/libstd.so (0x00007f7ea27f6000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7ea2631000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f7ea262c000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f7ea260b000)
/lib64/ld-linux-x86-64.so.2 (0x00007f7ea4f23000)
$