]> Cypherpunks repositories - gostls13.git/commit
cmd/link: pass -Wl,-z,nodelete when creating an ELF shared library
authorIan Lance Taylor <iant@golang.org>
Thu, 8 Oct 2015 17:22:50 +0000 (10:22 -0700)
committerIan Lance Taylor <iant@golang.org>
Thu, 8 Oct 2015 19:51:29 +0000 (19:51 +0000)
commitbd7de94d7fe8a0ba7742e90b1d6a09baa468bb58
tree7667d457d999684c63d2ce952d16fc9a50f9e1b3
parent91059de095703ebc4ce6b8bad7a0a40dedeef7dc
cmd/link: pass -Wl,-z,nodelete when creating an ELF shared library

Go shared libraries do not support dlclose, and there is no likelihood
that they will suppose dlclose in the future.  Set the DF_1_NODELETE
flag to tell the dynamic linker to not attempt to remove them from
memory.  This makes the shared library act as though every call to
dlopen passed the RTLD_NODELETE flag.

Fixes #12582.
Update #11100.
Update #12873.

Change-Id: Id4b6e90a1b54e2e6fc8355b5fb22c5978fc762b4
Reviewed-on: https://go-review.googlesource.com/15605
Reviewed-by: Michael Hudson-Doyle <michael.hudson@canonical.com>
src/cmd/link/internal/ld/lib.go