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

Cherrypick for 4.2.0: Fix stripping of macOS loadable bundles #13704

Closed
wants to merge 1 commit into from
Closed

Conversation

cpsauer
Copy link
Contributor

@cpsauer cpsauer commented Jul 17, 2021

Cherrypick of 1a0285c for 4.2.0 (#13558).

Without this bug fix, building stripped macOS loadable bundles fails--simply fixing a case that had been neglected.

Original commit message below:

Adds -x flag to stripping of macOS loadable bundles.

Loadable bundles--i.e. truly dynamically loadable libraries on macOS--cannot be stripped without this flag, since you'd be trying to strip away the all symbols, including those used for dynamic loading. Doing so results in error: symbols referenced by indirect symbol table entries that can't be stripped.

-x instead leads to the removal of the unneeded local symbols. As Apple notes in their man page: "For dynamic shared libraries, the maximum level of stripping is usually -x (to remove all non-global symbols)."

This should fix #11869

Closes #13314.

PiperOrigin-RevId: 368841977

Adds `-x` flag to stripping of macOS loadable bundles.

Loadable bundles--i.e. truly dynamically loadable libraries on macOS--cannot be stripped without this flag, since you'd be trying to strip away the all symbols, including those used for dynamic loading. Doing so results in `error: symbols referenced by indirect symbol table entries that can't be stripped`.

`-x` instead leads to the removal of the unneeded local symbols. As Apple notes in their man page: "For dynamic shared libraries, the maximum level of stripping is usually -x (to remove all non-global symbols)."

This should fix #11869

Closes #13314.

PiperOrigin-RevId: 368841977
@cpsauer cpsauer requested a review from lberki as a code owner July 17, 2021 22:30
@google-cla google-cla bot added the cla: yes label Jul 17, 2021
@cpsauer
Copy link
Contributor Author

cpsauer commented Jul 17, 2021

I don't have the permissions to assign, but this cherrypick should go to @katre, per #13558 (comment)

@katre katre self-assigned this Jul 19, 2021
@katre katre requested review from katre and removed request for lberki July 19, 2021 11:11
@katre
Copy link
Member

katre commented Jul 19, 2021

This was merged to release-4.2.0-patches (after a quick rebase).

@katre katre closed this Jul 19, 2021
@katre katre mentioned this pull request Jul 19, 2021
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants