【发布时间】:2022-01-23 06:46:43
【问题描述】:
我正在开发一个应用程序,做了一些更改,现在它甚至不再运行了。我已经恢复了更改,重建了整个应用程序,但仍然没有运气。我不明白这个错误是怎么出现的?我删除了 .o 文件并进行了全新的构建,但它仍然无法正常工作。我没有更改构建设置,我只是修改了一些 .cpp 文件。
如何解决我的可执行文件不再可执行的问题?
ls -l
-rwx--x--x 1 root root 6344081 Sep 16 23:35 z*
gdb 输出
[root@ipfrmk /]# gdb z
GNU gdb (GDB) 7.10
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-buildroot-linux-gnueabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
"/z": not in executable format: File truncated
(gdb) run z
Starting program: z
No executable file specified.
Use the "file" or "exec-file" command.
This 与我的问题无关,因为我没有从任何类型的 32 位更改为 64 位,反之亦然
我看到的大多数问题是“文件格式无法识别”或某种被截断的核心文件问题,这些不适用于我不相信的问题...
文件输出
[root@ipfrmk /]# file z
z: ERROR: ELF 32-bit LSB executable, ARM, EABI5 version 1 (GNU/Linux), statically linked, interpreter lib/ld-linux-armhf.so.3 error reading (Invalid argument)
有大量可用的文件系统空间(应用程序大约 63kb)
Filesystem Size Used Available Use% Mounted on
/dev/root 487.8M 189.9M 272.9M 41% /
我检查了构建机器和设备上的 md5sum 匹配
构建虚拟机
# md5sum /app/z
e901ef35e43d91545fb9d968c078dce2 /app/z
设备机器
[root@ipfrmk /]# md5sum z
e901ef35e43d91545fb9d968c078dce2 z
【问题讨论】:
-
只是一个随机名称,我尝试了各种名称较长的其他名称,但没有任何效果,它们都给出相同的错误
-
命令
file z输出什么?你为什么要以 root 身份运行? -
@Kevin 用文件输出更新了问题
-
您的文件系统空间不足吗? (在 Linux 上,请查看
df -h .)
标签: c++ gdb executable