-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
ObjWriter: Place unboxing section along other TEXT sections #97960
Conversation
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsRef: #97745 (comment) The new Apple linker generates unsorted garbage unwinding data for the
|
Unfortunately, I have no reliable way to test it and reason about it since the new linker is closed source. The change itself should be rather harmless. Thoughts? |
I think we can give this workaround a try. If it works, it is better than the workaround that we have pushed into .NET 8 servicing. I would do it for Apple platforms only and added a comment with a link to the issue that it is working around. |
I'm still waiting if Apple provides a better guidance than to use
Honestly, I don't think there's a point in limiting this to Apple platforms. We already pre-create the other TEXT sections, so this only brings the last one into consistency. For any reasonable linker it should make no difference and I tried this with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Let's hope this works!
I will run some tests with the changes locally - just to be sure. |
ILC works! But a few tests fail to build with linker failures like:
Not sure if this is some unrelated existing issue, or caused by the change, or just another bug in Prime linker that we only see now. This is for |
This is: #98266 |
had a lot more progress, but eventually failed with
let me sync up with the branch and try again. Maybe it is the same reason as in checked |
now checked fails with:
not sure which test that was. It made quite a lot of progress, I expected the build to pass. |
Thanks for running the additional tests. I didn’t try much more than the NativeAOT smoke tests and self-compiling ILC. I have no details from Apple about the root cause so this is a bit of a shot in the dark. It’s a relatively harmless change and seems to help at least in some cases. Worst case we can always backport your |
It definitely helps and looks like an incremental improvement. |
release (as in Some are in ILC, some in the linker.
|
This looks like GC hole in ILC:
|
I think, if the change is otherwise uncontroversial, we can merge it. |
Thanks again for the thorough test. I may try to investigate more but I don't think I will come up with anything in the short term. (I still think this change is worth merging even if it doesn't resolve all the issues.) |
FYI the -ld_classic workaround was ported to main: #98726 |
Ref: #97745 (comment)
The new Apple linker generates unsorted garbage unwinding data for the
__unbox
section in the final executable. Apparently reordering the sections in the object file to place it alongside other TEXT sections helps.