Skip to content

can/should exports re-export? #355

@m4b

Description

@m4b

Symbol re-exporting is when an export (publicly visible and linkable symbol) is tagged with meta-data that signals to the linker or dynamic loader/linker that the symbol either:

  1. resides in another library with:
    a. same name
    b. different name
  2. resides in the same library with:
    a. same name
    b. different name

Ostensibly, the point of the re-exporting mechanism is to:

  • decouple the symbol from its implementation
  • allow platform specific code for linking against the same symbol
  • allow forwarding symbol names to other/different symbol names

There are various reasons why you'd want to do this, some applicable to wasm, some not.

In the three major binary container formats, each implement a version of re-exporting for their declared exports.

  • PE32 uses the ForwarderChain
  • ELF uses the GNU_IFUNC
  • Mach-o uses special tagging in the export trie's entry

So can (or should) exports in wasm be able to re-export, and if so, how would this be implemented/represented?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions