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

[ObjWriter/Mach-O] Mark non-global symbols as .private_extern to match ELF #106446

Merged
merged 2 commits into from
Aug 19, 2024

Conversation

filipnavara
Copy link
Member

Extracted from #106224

.private_extern is the logical equivalent of .hidden+.global in ELF. We already emit those flags in ELF, so do it in Mach-O too.

Documentation for .private_extern:

It's used to mark symbols with limited visibility. When the file is fed to the static linker, it clears the N_EXT bit for each symbol with the N_PEXT bit set. The ld option -keep_private_externs turns off this behavior.

@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Aug 15, 2024
Copy link
Contributor

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

@MichalStrehovsky
Copy link
Member

/azp run runtime-nativeaot-outerloop, runtime-extra-platforms

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@MichalStrehovsky
Copy link
Member

Cc @ivanpovazan @dotnet/jit-contrib @dotnet/ilc-contrib for Apple-specific ObjWriter change. Looks reasonable to me but don't know much about Apple stuff.

Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@filipnavara I assume that we do not need to backport this fix to .NET 9. Correct?

@filipnavara
Copy link
Member Author

I assume that we do not need to backport this fix to .NET 9. Correct?

Correct. I don't see a need to backport it at this point.

Copy link
Member

@ivanpovazan ivanpovazan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@MichalStrehovsky MichalStrehovsky merged commit f856f4f into dotnet:main Aug 19, 2024
86 of 88 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Sep 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-NativeAOT-coreclr community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants