Trim unnecessary trailing zeroes in data segments#1587
Closed
Conversation
MaxGraey
reviewed
Dec 17, 2020
Comment on lines
+9
to
+22
| (data (i32.const 80) "") | ||
| (data (i32.const 96) "") | ||
| (data (i32.const 104) "") | ||
| (data (i32.const 108) "") | ||
| (data (i32.const 110) "") | ||
| (data (i32.const 111) "") | ||
| (data (i32.const 112) "") | ||
| (data (i32.const 128) "") | ||
| (data (i32.const 144) "") | ||
| (data (i32.const 152) "") | ||
| (data (i32.const 156) "") | ||
| (data (i32.const 158) "") | ||
| (data (i32.const 159) "") | ||
| (data (i32.const 160) "") |
Member
There was a problem hiding this comment.
Could such empty data segments also avoided after trimming?
Member
Author
There was a problem hiding this comment.
Hmm, good question. In this case we'd also lose the visual info that there is a data segment starting there. Still unsure how useful this or the zeroes are when manually viewing compiler output, somewhat depending on how common it is to run untouched binaries, and how far we'd like to go in terms of exactly displaying what becomes compiled.
Member
There was a problem hiding this comment.
Hmm, good question. In this case we'd also lose the visual info that there is a data segment starting there
Good point
Member
Author
|
Closing in favor of clarity. |
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.
After #1586 it may not be that useful anymore to keep the exact contents of compiler-generated managed data segments in untouched output (for manual inspection), due to explicitly aligning up to the next valid block size and filling with even more zeroes than before. Perhaps trimming is more useful now?