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

Basic implementation of legacy symbol mangling #425

Merged
merged 2 commits into from
May 11, 2021
Merged

Conversation

philberty
Copy link
Member

Implement basic rustc legacy symbol mangling

Rust supports two different symbol mangling methods legacy and V0. V0 is
the goal but its not yet stable. This implements the legacy method but
with a dummy hash value since it requires a sip128 implementation to
generate the apropriate hash which can be done in a sperate change.

This change allows us to actually assemble generic functions and avoid
bad symbol duplications.

Addresses #305

We need to track crate names including the translation units one for symbol
mangling purposes. This defaults to TestCrate for now and will need more
work to actually make this a compiler option as part of imports and
visbility.
Rust supports two different symbol mangling methods legacy and V0. V0 is
the goal but its not yet stable. This implements the legacy method but
with a dummy hash value since it requires a sip128 implementation to
generate the apropriate hash which can be done in a sperate change.

This change allows us to actually assemble generic functions and avoid
bad symbol duplications.

Addresses #305
@philberty philberty self-assigned this May 11, 2021
@philberty philberty mentioned this pull request May 11, 2021
3 tasks
@philberty philberty linked an issue May 11, 2021 that may be closed by this pull request
3 tasks
@philberty philberty removed a link to an issue May 11, 2021
3 tasks
@philberty
Copy link
Member Author

bors r+

@bors
Copy link
Contributor

bors bot commented May 11, 2021

Build succeeded:

@bors bors bot merged commit 5134aaa into master May 11, 2021
@philberty philberty linked an issue May 12, 2021 that may be closed by this pull request
3 tasks
@philberty philberty deleted the phil/generics12 branch May 12, 2021 11:03
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.

Symbol Mangling
1 participant