-
Notifications
You must be signed in to change notification settings - Fork 588
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
.symver under gcc 9.x and 10.x #3708
Comments
I have no idea about this. |
Ok thanks. I documented the problem in detail in the comments section at: https://maskray.me/blog/2020-11-26-all-about-symbol-versioning it seems corrected under gcc 11.x and higher |
What do you mean "with just the version script"? |
cat > a.map <<e |
So that works with all versions of gcc? Any reason to not use that all the time? |
with gcc 4.x thru 10.x and only the version script, objdump on the resulting lib shows: 0000000000000000 g DO ABS 0000000000000000 GLIBC_2.2.5 GLIBC_2.2.5 which looks odd to me. With 11.x, the .symver is required, and objdump shows: 0000000000000000 DF UND 0000000000000000 GLIBC_2.2.5 dlsym which looks correct to me. I haven't tried 12.x yet, planning to do that |
In overrides.c, this line:
asm(".symver dlsym, dlsym@GLIBC_2.2.5");
fails under gcc 9.x and 10.x with:
no symbol version section for versioned symbol `dlsym@GLIBC_2.2.5'
but works under gcc versions lower and higher (or at least doesn't issue an error). Notes:
-same error occurs with version script of GLIBC_2.2.5 { dlsym; }; (or global: dlsym)
-flto is enabled
-with just the version script, functionality is achieved, but I'm hoping there is way to avoid gcc version work-arounds
-symver attribute might be an option, but I don't see how to apply it for glibc functions
Did you guys find a work-around to build overrides.c on a range of gcc versions, for example linker command line options or symver attribute ? Thanks
The text was updated successfully, but these errors were encountered: