Stream: git-wasmtime

Topic: wasmtime / Issue #1325 Add support for hidden visibility


view this post on Zulip Wasmtime GitHub notifications bot (Mar 14 2020 at 17:47):

bjorn3 opened Issue #1325:

Feature

Currently it is only possible to create symbols that are either local to an object file, or exported from the final linking artifact. It is not possible to create symbols that are exported from an object file, but are not exported from the final linking artifact.

Benefit

This makes it possible to export less symbols from dylibs. This may be required to prevent conflicting definitions of a symbol. It also makes the linker faster when linking against a dylib compiled by Cranelift.

Implementation

Add a new Hidden variant to Linkage.

Alternatives

In the long term we may want to refactor Linkage into the separate concepts it has: if a symbol is weak, the scope of the symbol, if symbol interposition is allowed, ... Adding a Hidden variant to Linkage is easier for now though.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 16 2020 at 05:08):

pchickey commented on Issue #1325:

The requirement totally makes sense to me. I'm good with adding just a new Hidden variant to Linkage now, if you don't mind it changing a bit when its time to do the bigger refactoring you suggest. It should be very straightforward to add support for Linkage::Hidden to all of the existing backends in-tree.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 17 2020 at 18:34):

pchickey closed Issue #1325:

Feature

Currently it is only possible to create symbols that are either local to an object file, or exported from the final linking artifact. It is not possible to create symbols that are exported from an object file, but are not exported from the final linking artifact.

Benefit

This makes it possible to export less symbols from dylibs. This may be required to prevent conflicting definitions of a symbol. It also makes the linker faster when linking against a dylib compiled by Cranelift.

Implementation

Add a new Hidden variant to Linkage.

Alternatives

In the long term we may want to refactor Linkage into the separate concepts it has: if a symbol is weak, the scope of the symbol, if symbol interposition is allowed, ... Adding a Hidden variant to Linkage is easier for now though.


Last updated: Oct 23 2024 at 20:03 UTC