Linux linker supports version script, which is the equivalent of Solaris
linker mapfile. Linux version scripts are designed to have the same
format as Solaris mapfiles, but with some limitations (e.g. no duplicate
version strings or symbols).
Currently linker mapfiles are enabled for the Solaris build to limit
exported dynamic symbols, but the mapfiles are not used in the Linux
build. We should be able to directly use most of the Solaris mapfiles
on Linux and it should be quite easy to convert the rest.
The primary benefit of limiting dynamic symbols is to avoid potential
symbol conflicts. And when this is used with statically linking libstdc++,
we should be able to support JNI libraries built by different version of
g++ without the annoying system abort due to conflicting libstdc++
functions. Limiting dynamic symbols should also generate slightly smaller
.so files and faster startup time.