Skip to content

Conversation

kkysen
Copy link
Collaborator

@kkysen kkysen commented Jul 23, 2025

Based on @ahomescu's investigation:

I tried using #[rustc_std_internal_symbol] on rav1d's #[no_mangle] symbols (some of the tables in tables.rs). Per rust-lang/rust#143422, #[rustc_std_internal_symbol] is unstable and not meant to be used for this, and in fact, no longer works on #[no_mangle] symbols (so I had to move our pinned nightly back 1 day), but this is just for experimenting. This is able to successfully build as a cdylib with cargo build, not with cargo build --release, where I get error: undefined symbol for all of these symbols. So I don't think this works even for the hidden visibility issue (note: also fixed in #1367 through small changes to the assembly).

As for the performance issues raised in #1417, I don't think this addresses them. #1417 is about Rust calls to asm functions having unnecessary indirection, not about any symbols that Rust defines having any issues. And it can be fixed by using RUSTFLAGS="-Z plt=yes".

@kkysen
Copy link
Collaborator Author

kkysen commented Jul 23, 2025

Closing since this doesn't actually work and is very unstable so we wouldn't use it anyways.

@kkysen kkysen closed this Jul 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant