Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wasm-linker: generate 'producers' section #13054

Merged
merged 3 commits into from Oct 8, 2022

Conversation

Luukdegram
Copy link
Sponsor Member

Implements the producers custom section. This section contains meta data describing what tools were used to generate the binary as well as what the source language was. Other tools can use this information to apply certain transformations (such as name mangling for c++), or even optimizations.

For now, we always emit Zig as source language and as tool used to produce the binary. The next step would be to parse all linked object files and static archives and append their source languages and tools + SDK's also.

The `producers` section contains meta data of the binary and/or
object file. It *can* contain the source language, the tool it
was processed by, and/or the SDK that was used to produce the file.

For now, we always set the language and processed-by fields to Zig.
In the future we will parse linked object files to detect their
producers sections and append (if different) their language, SDK
and processed-by fields.
This also turns off non-debug modes for the bss linker tests for
Wasm. This is done as it's not required to guarantee to zero out
the bss section for non-debug modes.
@Luukdegram Luukdegram merged commit fa9327a into ziglang:master Oct 8, 2022
@Luukdegram Luukdegram deleted the wasm-producer branch October 8, 2022 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant