-
Notifications
You must be signed in to change notification settings - Fork 41
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
[dotnet/release/8.0] [ObjWriter] Emit the MH_SUBSECTIONS_VIA_SYMBOLS header flag for Mach-O #472
[dotnet/release/8.0] [ObjWriter] Emit the MH_SUBSECTIONS_VIA_SYMBOLS header flag for Mach-O #472
Conversation
dotnet#471) The flag tells the linker that there are no functions with overlapping code and thus the code sections can be divided into subsections based on the symbols. This is similar in effect to how `-ffunction-sections` behaves on ELF. Notably, this enables optimization such as dead code stripping and identical code folding, if requested through linker switches. Old ld64 linker tends to run into deep stack loop without this switch if `-dead_strip` is used (encountered in Xamarin, not used by regular NativeAOT), and often ends up stack overflowing. New Xcode 15+ linker completely fails to produce correct unwind tables without this flag, which results in the NativeAOT executables crashing during GC or on first stack walk.
|
Approved by tactics in email |
Tagging @carlossanlop |
I don't manage this repo but I can merge it if no one else has permission. This is targeting release/8.0 btw. Is that intended? I don't know if this repo has an rc2 branch. |
We don't have an RC2 branch. It should flow into 8.0 and 8.0 rc2 where there are subscriptions. |
Do we need to manually trigger the flow? I looked at subscriptions earlier today and I thought some of the branches were flowing weekly. Don't remember if 8.0 was one of them, however (and I'm not on a computer where I can check right now) |
I'm monitoring the official build first to see if it passes and then I can trigger flow if necessary. |
PR's are up in emsdk for both 8.0 branches. Once that's in, then it'll flow to runtime. |
The flag tells the linker that there are no functions with overlapping code and thus the code sections can be divided into subsections based on the symbols. This is similar in effect to how
-ffunction-sections
behaves on ELF.Notably, this enables optimization such as dead code stripping and identical code folding, if requested through linker switches.
Old ld64 linker tends to run into deep stack loop without this switch if
-dead_strip
is used (encountered in Xamarin, not used by regular NativeAOT), and often ends up stack overflowing. New Xcode 15+ linker completely fails to produce correct unwind tables without this flag, which results in the NativeAOT executables crashing during GC or on first stack walk.