Skip to content

[objcopy] Implement --weaken, --weaken-symbol(s) flags for MachO Object Files #70560

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

Merged

Conversation

danzimm
Copy link
Contributor

@danzimm danzimm commented Oct 28, 2023

In a recent legacy codebase I found an invocation of GNU objconv used to weaken symbols of MachO object files. I tried to replace objconv with the corresponding invocation of llvm-objcopy and found --weaken (and friends) weren't implemented for MachO.

This PR implements those weakening flags for MachO file types.

Copy link
Collaborator

@alexander-shaposhnikov alexander-shaposhnikov left a comment

Choose a reason for hiding this comment

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

LGTM

@danzimm
Copy link
Contributor Author

danzimm commented Oct 31, 2023

Thanks for reviewing! I don't have write access- can you merge this for me?

@alexander-shaposhnikov
Copy link
Collaborator

Let's address @MaskRay's comments - then i'm happy to merge it in

@MaskRay MaskRay requested a review from jh7370 November 2, 2023 05:35
Copy link
Collaborator

@jh7370 jh7370 left a comment

Choose a reason for hiding this comment

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

No objections from me. Happy for this to be merged once @MaskRay's comments (and my nit) have been addressed.

@danzimm danzimm force-pushed the llvm-objcopy-macho-weaken branch from 9456cd8 to 92b0389 Compare November 3, 2023 02:51
@danzimm
Copy link
Contributor Author

danzimm commented Nov 3, 2023

I think I've addressed everything now-- feel free to leave extra comments, though! Thanks everyone for the help!

@alexander-shaposhnikov alexander-shaposhnikov merged commit 0807846 into llvm:main Nov 6, 2023
@danzimm danzimm deleted the llvm-objcopy-macho-weaken branch November 6, 2023 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants