-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
FIX(overlay): Implement library search list for dlsym(), add "libc.so.6" to it #5949
FIX(overlay): Implement library search list for dlsym(), add "libc.so.6" to it #5949
Conversation
@carlocastoldi Could you check whether this fixes #5852, please? |
Shouldn't we also search in libdl, if the search in libc is not successful? Otherwise, I think we would essentially lose support for older systems wouldn't we? |
This PR indeed fixes #5852 for me! |
Thank you for testing!
Indeed, now that we have a library list it's just a matter of adding a line. Ubuntu 22.04 (glibc 2.35): $ readelf -Ws --dyn-syms /lib/x86_64-linux-gnu/libc.so.6 | grep dlsym
793: 00000000000907c0 206 FUNC GLOBAL DEFAULT 15 dlsym@@GLIBC_2.34
795: 00000000000907c0 206 FUNC GLOBAL DEFAULT 15 dlsym@GLIBC_2.2.5 Ubuntu 20.04 (glibc 2.31): $ readelf -Ws --dyn-syms /lib/x86_64-linux-gnu/libc.so.6 | grep dlsym
2155: 000000000015f980 249 FUNC GLOBAL DEFAULT 15 __libc_dlsym@@GLIBC_PRIVATE Ubuntu 18.04 (glibc 2.27): $ readelf -Ws --dyn-syms /lib/x86_64-linux-gnu/libc.so.6 | grep dlsym
2123: 00000000001663b0 214 FUNC GLOBAL DEFAULT 13 __libc_dlsym@@GLIBC_PRIVATE |
….6" to it glibc 2.34 moved all functionality of various libraries into the main one. As a result, dlsym() is now exported by libc instead of libdl. This commit also makes the related code more robust. We now iterate through a common library name/path list, regardless of the OS.
420fcfa
to
84535d8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Theoretically, having the refactoring and the actual fix in separate commits would be desirable, but not sure if worth the effort in this case...
Does it happen if you switch to borderless windowed mode too? |
Yes, it happens in fullscreen and windowed version. I no don't know how to run the game in borderless window, tho |
|
It doesn't happen with
|
what is stopping this from being merged? |
glibc 2.34 moved all functionality of various libraries into the main one.
As a result,
dlsym()
is now exported bylibc
instead oflibdl
.This commit also makes the related code more robust.
We now iterate through a common library name/path list, regardless of the OS.