用gcc 4.9.2编译,关于“不是可执行格式”的奇怪错误

时间:2015-01-28 05:55:30

标签: c++ c linux gcc gdb

使用gcc4.9.2编译应用程序时,尝试使用gdb进行调试时出现奇怪的错误。虽然我可以运行可执行文件OK:

$./simapp --help

Checking for design variables is enabled.
Quick simplification of expressions is enabled.    
In expressions, the replacement of references by their values is enabled.    
Usage: simapp [options] [-r rawfile] [inputfile]

Options:
    -h             List devices and analyses.
    .............................

但是,尝试运行gdb会出现一个错误,即不能使用可执行格式...为什么?

$gdb simapp
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-75.el6)
Copyright (C) 2010 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 "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
"/home/build/64bitdebug/bin/simapp": not in executable format: File format not recognized
(gdb)

格式有什么问题?以下是“ldd simapp”的一些可能相关的行:

libstdc++.so.6 => /opt/gcc/4.9.2_rebld/lib64/libstdc++.so.6 (0x00007f4c8f119000)
        libm.so.6 => /lib64/libm.so.6 (0x0000003e9c200000)
        libgcc_s.so.1 => /opt/gcc/4.9.2_rebld/lib64/libgcc_s.so.1 (0x00007f4c8ef02000)
        libc.so.6 => /lib64/libc.so.6 (0x0000003e9be00000)

编辑注意:我意识到这个可执行文件大约是800MB;可执行文件是否有某种大小限制?

0 个答案:

没有答案