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

runtime symbol lookup error for __attribute__((cold)) functions in dav1d after #451 and -fvisibility=hidden #466

Open
kkysen opened this issue Nov 11, 2024 · 0 comments

Comments

@kkysen
Copy link
Contributor

kkysen commented Nov 11, 2024

After #451, __attribute__((cold)) functions are failing to be resolved at runtime with a symbol lookup error:

> ../dav1d-ia2/build/tools/dav1d -h
../dav1d-ia2/build/tools/dav1d: symbol lookup error: /home/kkysen/work/rust/dav1d-ia2/build/tools/../src/libcallgates.so: undefined symbol: dav1d_num_logical_processors

I say __attribute__((cold)) because all of the functions this happened with were marked as such, but removing the __attribute__((cold)) did not fix the issue. Neither did __attribute__((used)). But __attribute__((visibility("default")) did fix the issue (note that -fvisibility=hidden was set). I'm not really sure what's happening here.

For dav1d specifically, the functions were:

  • dav1d_num_logical_processors
  • dav1d_init_cpu
  • dav1d_get_cpu_flags_x86
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

No branches or pull requests

1 participant