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

Add -fdata-section support to cranelift-object #2368

Open
bjorn3 opened this issue Nov 5, 2020 · 0 comments
Open

Add -fdata-section support to cranelift-object #2368

bjorn3 opened this issue Nov 5, 2020 · 0 comments
Labels
cranelift Issues related to the Cranelift code generator

Comments

@bjorn3
Copy link
Contributor

bjorn3 commented Nov 5, 2020

Feature

This is the data object counterpart to #2218.

Benefit

Same as per_function_sections. From the description of #2218:

This makes it possible for the linker to omit unused functions when --gc-sections is passed.

For cg_clif the executable size savings are quite big. One example is 26MB when a single .text section is used, but 15MB when a single section for each function is used, which is the same as when compiled using cg_llvm. I will probably disable this in debug mode though as it significantly increases the linking time.

Implementation

Similar to #2218

Alternatives

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cranelift Issues related to the Cranelift code generator
Projects
None yet
Development

No branches or pull requests

2 participants