Strip symbols of all binaries#109
Merged
Merged
Conversation
sbc100
reviewed
Mar 24, 2020
3141caa to
6dbd13e
Compare
Member
|
Testing for "ELF" is too narrow since we also support on-ELF hosts such as macOS. Would it work to just unconditionally run strip on every file under Alternatively, if we could add "-s" to the link command-line, that would cause it to strip executables too. |
6dbd13e to
25b4e3e
Compare
Collaborator
Author
|
@sunfishcode, I didn't really know all the places |
Member
|
I think post-stripping is probably best. The current approach of this patch is to strip anything that |
This was referenced Apr 2, 2020
Member
|
Sounds reasonable. |
kildom
pushed a commit
to kildom/clang-wasi-port
that referenced
this pull request
Jul 14, 2021
…s. (WebAssembly#109) * Link `populate_environ` only if we actually need environment variables. This avoids linking in the environment variable initialization code, and the __wasi_environ_sizes_get and __wasi_environ_get imports, in programs that don't use environment variables. This also removes the "___environ" (three underscores) alias symbol, which is only in musl for backwards compatibility. * Switch to //-style comments. * If malloc fails, don't leave `__environ` pointing to an uninitialized buffer. * Fix a memory leak if one malloc succeeds and the other fails. * Use calloc to handle multiplication overflow. This also handles the NULL terminator. * Don't initialize __environ until everything has succeeded. * Avoid leaking in case __wasi_environ_get fails. * Handle overflow in the add too. * Add #include <stdlib.h> for malloc etc. * If the environment is empty, don't allocate any memory.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@sbc100, this resolves the discussion we had in #108 about stripping symbols from all binaries.