-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Experiment: disable -fPIC and relro #12582
Merged
Merged
Conversation
This file contains 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
❌ @Jarred-Sumner, your commit has failing tests :( 🪟💻 3 failing tests Windows x64 baseline
🪟💻 2 failing tests Windows x64
|
clang-tidy nits are fixed! Thank you. |
current: ❯ bloaty /Users/jarred/Downloads/bun-linux-x64\ 16/bun --demangle=full -w
FILE SIZE VM SIZE
-------------- --------------
48.5% 43.4Mi 44.8% 43.4Mi .text
44.4% 39.6Mi 41.0% 39.6Mi .rodata
0.0% 0 7.6% 7.35Mi .bss
4.4% 3.94Mi 3.9% 3.77Mi .data.rel.ro
2.0% 1.80Mi 1.9% 1.80Mi .eh_frame
0.0% 0 0.4% 387Ki .tbss
0.4% 330Ki 0.3% 330Ki .eh_frame_hdr
0.2% 211Ki 0.0% 0 .data
0.0% 23.1Ki 0.0% 23.1Ki .gcc_except_table
0.0% 13.6Ki 0.0% 13.6Ki .dynsym
0.0% 9.61Ki 0.0% 9.61Ki .rela.plt
0.0% 8.13Ki 0.0% 8.13Ki .dynstr
0.0% 6.42Ki 0.0% 6.42Ki .plt
0.0% 3.26Ki 0.0% 3.26Ki [LOAD #2 [R]]
0.0% 3.25Ki 0.0% 3.25Ki .got.plt
0.0% 2.59Ki 0.0% 2.44Ki [17 Others]
0.0% 2.41Ki 0.0% 2.41Ki .got
0.0% 2.06Ki 0.0% 0 [ELF Section Headers]
0.0% 1.99Ki 0.0% 1.99Ki .rela.dyn
0.0% 1.14Ki 0.0% 1.14Ki .gnu.version
0.0% 1.07Ki 0.0% 1.07Ki .gnu.hash
100.0% 89.4Mi 100.0% 96.7Mi TOTAL |
Outcome: we still have The blocker now is mostly Zig's lack of PIC support - ziglang/zig#17430 FILE SIZE
--------------
48.2% 42.9Mi .text
44.6% 39.7Mi .rodata
4.3% 3.86Mi .data.rel.ro
2.2% 1.93Mi .eh_frame
0.4% 356Ki .eh_frame_hdr
0.2% 210Ki .data
0.0% 23.1Ki .gcc_except_table
0.0% 13.5Ki .dynsym
0.0% 9.54Ki .rela.plt
0.0% 8.07Ki .dynstr
0.0% 6.38Ki .plt
0.0% 3.39Ki [LOAD #2 [R]]
0.0% 3.23Ki .got.plt
0.0% 2.42Ki .got
0.0% 2.06Ki .rela.dyn
0.0% 2.06Ki [ELF Section Headers]
0.0% 1.37Ki [16 Others]
0.0% 1.13Ki .gnu.version
0.0% 1.07Ki .gnu.hash
0.0% 560 [ELF Program Headers]
0.0% 480 .dynamic
100.0% 89.1Mi TOTAL |
@Jarred-Sumner will replacing libicu make it even smaller? |
paperdave
pushed a commit
that referenced
this pull request
Jul 24, 2024
Co-authored-by: Jarred-Sumner <[email protected]>
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.
What does this PR do?
If we remove fpic and relro, we will shave off about 6 MB from the build on Linux
I'm not confident we can remove fpic. It might break napi. If this build fails then let's re-enable fpic and just relro.
Note that Node does not enable relro. This is node's:
How did you verify your code works?