-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
Use -Wl,--dynamic-list=x.list, not -Xlinker -export-dynamic #54321
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
Comments
FSF GDB (and future Fedora GDBs) became 250KB smaller than before. Python recently disabled this GDB build optimization so GDB is 250KB larger again. -rwxr-xr-x 1 4524488 gdb-7.1-19.fc13.x86_64/usr/bin/gdb Some Python binaries/libraries could probably also benefit from smaller pageable code image. GDB regressed due to /usr/lib*/python*/config/Makefile contains: and GDB thus has to use it even for its own link, effectively disabling its: AFAIK Python already contains the required exports list but it is used only on MS-Windows. It should be utilized even for GNU/Linux builds. |
Here is the implementation. Python/getargs.c was modified for: The Modules/ files were modified for: without this patch:
-rw-r--r-- 1 jkratoch jkratoch 5775829 Jan 12 17:42 python-libs-2.7.2-18.fc17.x86_64.rpm
-r-xr-xr-x 1 jkratoch jkratoch 1738264 Jan 12 17:44 ./clean/python-libs-2.7.2-18.fc17.x86_64/usr/lib64/libpython2.7.so.1.0*
1226 libpython2.7.so.1.0 .dynsym exports
+
-rw-r--r-- 1 jkratoch jkratoch 1986161 Jan 12 17:48 gdb-7.4.50.20120103-8.fc17.x86_64.rpm
-rwxr-xr-x 1 jkratoch jkratoch 5018800 Jan 12 19:13 clean/gdb-7.4.50.20120103-8.fc17.x86_64/usr/bin/gdb*
with this patch:
-rw-r--r-- 1 jkratoch jkratoch 5762537 Jan 12 19:04 python-libs-2.7.2-18hidden3.fc17.x86_64.rpm
-r-xr-xr-x 1 jkratoch jkratoch 1720920 Jan 12 19:06 ./hidden3/python-libs-2.7.2-18hidden3.fc17.x86_64/usr/lib64/libpython2.7.so.1.0*
1046 libpython2.7.so.1.0 .dynsym exports
+
-rw-r--r-- 1 jkratoch jkratoch 1886781 Jan 12 19:11 gdb-7.4.50.20120103-8.fc17.x86_64.rpm
-rwxr-xr-x 1 jkratoch jkratoch 4732080 Jan 12 19:13 hidden3/gdb-7.4.50.20120103-8.fc17.x86_64/usr/bin/gdb* |
What more can be done to get it fixed? I do not mind Python but GDB linking is broken due to it. And while I can workaround it in GDB I am not used for workarounding one Free package in another Free package. Free software has the advantage problems can be fixed at the right place. |
When I try to build with the attached patch on the 2.7 branch many (if not all) of the modules fail to build: Failed to build these modules: I see several warnings in the build output: *** WARNING: renaming "_codecs_iso2022" since importing it failed: build/lib.lin |
There was a bug for non-shared build of Python, thanks. This patch is an improvement on its but it is not yet complete. But I found out GDB does not need to be affected by this Bug. When I use -fvisibility=hidden for GDB .c files then "-Xlinker -export-dynamic" has no longer any negative effect (GDB was using only "-Wl,--dynamic-list" now which works without libpython but not with libpython). Therefore I no longer mind much about this Bug. Still at least: Even with clean tree the upstream build generates for me: (so sunaudiodev.c was changed without any testing of it) |
The patch is fairly incomplete: it assumes that the compiler supports __attribute__((visibility())), but it really needs to check for that. Also, there is no chance that this can go into Python 2.7; retargetting for 3.3. |
It even crashes applications due to pollution of dynamic symbols namespace by application symbols as seen in: |
@jankratochvil Is this issue still relevant? |
I am no longer involved with GDB. But I also think it has been fixed for python2->3:
|
Great, thank you. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: