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

Legacy dummy hash causes duplicate symbols #428

Closed
philberty opened this issue May 13, 2021 · 0 comments · Fixed by #430
Closed

Legacy dummy hash causes duplicate symbols #428

philberty opened this issue May 13, 2021 · 0 comments · Fixed by #430

Comments

@philberty
Copy link
Member

The symbol mangling issue #305 currently only implemented a dummy hash the legacy hash encompasses function generic parameters as well as we can see from compiler explorer:

https://godbolt.org/z/nT8PcjPG4

The mangled symbol does not contain anything to do with the generic parameters but the hashes are not duplicated.

@philberty philberty self-assigned this May 13, 2021
bors bot added a commit that referenced this issue May 14, 2021
430: Add FNV-128 hash for legacy symbol mangling r=philberty a=philberty

Rustc uses a SIP128 hash for the legacy symbol mangling but an FNV hash is
simpler to implement. This is a port of the implementation from golang
stdlib hash package.

The fingerprint for the hash is simply the function signature for now.
Rustc takes into account options such as -Cmetadata to generate uniqueness.

We still need to implement a SIP128 hasher and the V0 symbol mangling but this
will do in the interim.

Addresses: #305
Fixes: #428

Co-authored-by: Philip Herron <[email protected]>
@bors bors bot closed this as completed in 9bcbfee May 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant