Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/link: ABI hash of a shared library changes if any inlineable function changes #23405
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
We don't have any mechanism for preventing inlining of a package that is put into a shared library. The problem is that inlining is done by the compiler, but determination of which packages will be pulled from a shared library is determined by the linker. Any fix we make here would have to address that somehow.
changed the title from
ABI hash of a shared library changes if any inlineable function changes
cmd/link: ABI hash of a shared library changes if any inlineable function changes
Jan 10, 2018
As I said in point 1 above, when the compiler is invoked with -dynlink, it can omit the inlineable functions from a package's export data. This will ensure that any other package the imports it will not be able to inline its functions. I do realize that this will hurt the performance of multi-package shared libraries, but multi-package shared libraries are not common outside of libstd.so, and we could try to come up with a special case for the latter.