Open L-Super opened 1 year ago
I have made some new discoveries. The libQt5Core.so
copied by linuxdeployqt is not the same size as the libQt5Core.so
from Qt. I don't have any libQt5Core.so on my system that matches the size of the one copied by linuxdeployqt. When I replaced the libQt5Core.so
, the program was able to run normally. Since I haven't read the source code, I'm not sure where the problem occurred.
Qt:
$ ll libQt5Core.so.5
-rwxr-xr-x 1 geit geit 7127656 11月 15 10:51 libQt5Core.so.5
$ readelf -d libQt5Core.so.5
Dynamic section at offset 0x6c3d70 contains 36 entries:
标记 类型 名称/值
0x0000000000000001 (NEEDED) 共享库:[libpthread.so.0]
0x0000000000000001 (NEEDED) 共享库:[libz.so.1]
0x0000000000000001 (NEEDED) 共享库:[libdouble-conversion.so.1]
0x0000000000000001 (NEEDED) 共享库:[libdl.so.2]
0x0000000000000001 (NEEDED) 共享库:[libgthread-2.0.so.0]
0x0000000000000001 (NEEDED) 共享库:[libglib-2.0.so.0]
0x0000000000000001 (NEEDED) 共享库:[libstdc++.so.6]
0x0000000000000001 (NEEDED) 共享库:[libm.so.6]
0x0000000000000001 (NEEDED) 共享库:[libgcc_s.so.1]
0x0000000000000001 (NEEDED) 共享库:[libc.so.6]
0x0000000000000001 (NEEDED) 共享库:[ld.so.1]
0x000000000000000e (SONAME) Library soname: [libQt5Core.so.5]
0x0000000000000019 (INIT_ARRAY) 0x6baf58
0x000000000000001b (INIT_ARRAYSZ) 24 (bytes)
0x000000000000001a (FINI_ARRAY) 0x6baf70
0x000000000000001c (FINI_ARRAYSZ) 16 (bytes)
0x0000000000000004 (HASH) 0x2d0
0x000000006ffffef5 (GNU_HASH) 0x8b98
0x0000000000000005 (STRTAB) 0x3a440
0x0000000000000006 (SYMTAB) 0x12f78
0x000000000000000a (STRSZ) 249654 (bytes)
0x000000000000000b (SYMENT) 24 (bytes)
0x0000000000000003 (PLTGOT) 0x6c87b0
0x0000000000000002 (PLTRELSZ) 76944 (bytes)
0x0000000000000014 (PLTREL) RELA
0x0000000000000017 (JMPREL) 0xe3a10
0x0000000000000007 (RELA) 0x7ac38
0x0000000000000008 (RELASZ) 506472 (bytes)
0x0000000000000009 (RELAENT) 24 (bytes)
0x000000006ffffffc (VERDEF) 0x7a7e0
0x000000006ffffffd (VERDEFNUM) 19
0x000000006ffffffe (VERNEED) 0x7aa78
0x000000006fffffff (VERNEEDNUM) 7
0x000000006ffffff0 (VERSYM) 0x77376
0x000000006ffffff9 (RELACOUNT) 1943
0x0000000000000000 (NULL) 0x0
linuxdeployqt:
$ ll libQt5Core.so.5
-rwxr-xr-x 1 geit geit 7428816 11月 14 10:18 libQt5Core.so.5
$ readelf -d libQt5Core.so.5
Dynamic section at offset 0x6d0000 contains 37 entries:
标记 类型 名称/值
0x000000000000001d (RUNPATH) Library runpath: [$ORIGIN]
0x0000000000000001 (NEEDED) 共享库:[libpthread.so.0]
0x0000000000000001 (NEEDED) 共享库:[libz.so.1]
0x0000000000000001 (NEEDED) 共享库:[libdouble-conversion.so.1]
0x0000000000000001 (NEEDED) 共享库:[libdl.so.2]
0x0000000000000001 (NEEDED) 共享库:[libgthread-2.0.so.0]
0x0000000000000001 (NEEDED) 共享库:[libglib-2.0.so.0]
0x0000000000000001 (NEEDED) 共享库:[libstdc++.so.6]
0x0000000000000001 (NEEDED) 共享库:[libm.so.6]
0x0000000000000001 (NEEDED) 共享库:[libgcc_s.so.1]
0x0000000000000001 (NEEDED) 共享库:[libc.so.6]
0x0000000000000001 (NEEDED) 共享库:[ld.so.1]
0x000000000000000e (SONAME) Library soname: [libQt5Core.so.5]
0x0000000000000019 (INIT_ARRAY) 0x6baf58
0x000000000000001b (INIT_ARRAYSZ) 24 (bytes)
0x000000000000001a (FINI_ARRAY) 0x6baf70
0x000000000000001c (FINI_ARRAYSZ) 16 (bytes)
0x0000000000000004 (HASH) 0x70d1e0
0x000000006ffffef5 (GNU_HASH) 0x8b98
0x0000000000000005 (STRTAB) 0x6d02a0
0x0000000000000006 (SYMTAB) 0x12f78
0x000000000000000a (STRSZ) 249662 (bytes)
0x000000000000000b (SYMENT) 24 (bytes)
0x0000000000000003 (PLTGOT) 0x6c87b0
0x0000000000000002 (PLTRELSZ) 76944 (bytes)
0x0000000000000014 (PLTREL) RELA
0x0000000000000017 (JMPREL) 0xe3a10
0x0000000000000007 (RELA) 0x7ac38
0x0000000000000008 (RELASZ) 506472 (bytes)
0x0000000000000009 (RELAENT) 24 (bytes)
0x000000006ffffffc (VERDEF) 0x7a7e0
0x000000006ffffffd (VERDEFNUM) 19
0x000000006ffffffe (VERNEED) 0x7aa78
0x000000006fffffff (VERNEEDNUM) 7
0x000000006ffffff0 (VERSYM) 0x77376
0x000000006ffffff9 (RELACOUNT) 1943
0x0000000000000000 (NULL) 0x0
I compiled it from source code and it executed successfully. However, when I remove the Qt environment variable, the program fails to start.
GDB result: