环境
ubuntu20.04
错误
yjp@DESKTOP-AABEK80:~/idadbgsrv$ ./s1
-bash: ./s1: No such file or directory
解决方法
readelf -d linux_server查看elf信息
Dynamic section at offset 0xbde84 contains 32 entries:
Tag Type Name/Value
0x00000001 (NEEDED) Shared library: [librt.so.1]
0x00000001 (NEEDED) Shared library: [libpthread.so.0]
0x00000001 (NEEDED) Shared library: [libthread_db.so.1]
0x00000001 (NEEDED) Shared library: [libc.so.6]
0x00000001 (NEEDED) Shared library: [ld-linux.so.2]
0x00000001 (NEEDED) Shared library: [libdl.so.2]
0x00000001 (NEEDED) Shared library: [libstdc++.so.6]
0x00000001 (NEEDED) Shared library: [libm.so.6]
0x00000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x0000000c (INIT) 0x804a990
0x0000000d (FINI) 0x80c8c04
0x00000019 (INIT_ARRAY) 0x8105944
0x0000001b (INIT_ARRAYSZ) 56 (bytes)
0x0000001a (FINI_ARRAY) 0x810597c
0x0000001c (FINI_ARRAYSZ) 4 (bytes)
0x6ffffef5 (GNU_HASH) 0x80481cc
0x00000005 (STRTAB) 0x80490c0
0x00000006 (SYMTAB) 0x8048250
0x0000000a (STRSZ) 3121 (bytes)
0x0000000b (SYMENT) 16 (bytes)
0x00000015 (DEBUG) 0x0
0x00000003 (PLTGOT) 0x8107000
0x00000002 (PLTRELSZ) 1664 (bytes)
0x00000014 (PLTREL) REL
0x00000017 (JMPREL) 0x804a310
0x00000011 (REL) 0x804a0e0
0x00000012 (RELSZ) 560 (bytes)
0x00000013 (RELENT) 8 (bytes)
0x6ffffffe (VERNEED) 0x8049ec0
0x6fffffff (VERNEEDNUM) 8
0x6ffffff0 (VERSYM) 0x8049cf2
0x00000000 (NULL) 0x0
安装一下32位的共享库即可
sudo apt-get install lib32stdc++6