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

[SR-15376] Duplicate "__PROTOCOL_*" metadata in linked binaries #57698

Open
swift-ci opened this issue Oct 22, 2021 · 0 comments
Open

[SR-15376] Duplicate "__PROTOCOL_*" metadata in linked binaries #57698

swift-ci opened this issue Oct 22, 2021 · 0 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-15376
Radar None
Original Reporter alxb (JIRA User)
Type Bug
Additional Detail from JIRA
Votes 0
Component/s
Labels Bug
Assignee None
Priority Medium

md5: 9d567090a81023015bb0128b792a70ec

Issue Description:

Some binaries show duplicate entries such as:

__PROTOCOL_NSObject

along with all descending linked metadata.

The Issue seems to be coming from GenClass.cpp#L1396 where, a global is created with internal linkage: GenClass.cpp#L2181. Because of the internal linkage, the linker will not merge identical records in the final output.

The fix seems to be updating the linkage to WeakAnyLinkage, as in ObjC
CGObjCMac.cpp#L6967

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.
Projects
None yet
Development

No branches or pull requests

1 participant