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

.eh_frame contains more CIEs than needed #123

Open
davidlattimore opened this issue Sep 12, 2024 · 2 comments
Open

.eh_frame contains more CIEs than needed #123

davidlattimore opened this issue Sep 12, 2024 · 2 comments
Assignees

Comments

@davidlattimore
Copy link
Owner

readelf -W --debug-dump=frames wild/tests/build/rust-integration.rs-llvm-dynamic.wild | grep CIE | wc -l
23
readelf -W --debug-dump=frames wild/tests/build/rust-integration.rs-llvm-dynamic.ld | grep CIE | wc -l
2

Wild GCs FDEs for sections that aren't used, but doesn't currently GC CIEs that aren't referenced by any FDEs.

@davidlattimore davidlattimore self-assigned this Sep 12, 2024
davidlattimore added a commit that referenced this issue Sep 12, 2024
This should help with #123. It's also a tiny bit faster.
davidlattimore added a commit that referenced this issue Sep 12, 2024
This should help with #123. It's also a tiny bit faster.
davidlattimore added a commit that referenced this issue Sep 12, 2024
This should help with #123. It's also a tiny bit faster.
@marxin
Copy link
Collaborator

marxin commented Sep 12, 2024

Just providing statistics for the current main branch and other linkers (for Clang binary):

Mold:

.eh_frame_hdr                                                    1.2 MiB
.eh_frame                                                        9.7 MiB

LLD:

.eh_frame_hdr                                                    1.2 MiB
.eh_frame                                                        9.7 MiB

Wild:

.eh_frame_hdr                                                    1.1 MiB
.eh_frame                                                        9.0 MiB

@davidlattimore
Copy link
Owner Author

That's interesting that the total size of those sections is smaller. I wonder what's causing that. Especially given that Wild is emitting more CIEs. Perhaps Wild is emitting less FDEs for some reason.

If I use the commands from the first comment of this issue to look at the clang binary, I get 1 CIE for lld and 2746 for Wild. Worse, if I look at the rustc-driver shared object, I get 2 for all the linkers except for Wild, which ends up with 15025.

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

No branches or pull requests

2 participants