GDB 警告:在 0x7ffff7ffd000 添加的符号文件系统提供的 DSO 中找不到可加载部分 [英] GDB Warning: Loadable section not found in added symbol-file system-supplied DSO at 0x7ffff7ffd000

查看:25
本文介绍了GDB 警告:在 0x7ffff7ffd000 添加的符号文件系统提供的 DSO 中找不到可加载部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

abijith bufferOverFlow $ gdb a.out
GNU gdb (GDB) 7.6
Copyright (C) 2013 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-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/abijith/Project/Security/bufferOverFlow/a.out...done
(gdb) r
Starting program: /home/abijith/Projec2qt/Security/bufferOverFlow/a.out 
warning: no loadable sections found in added symbol-file system-supplied 
SO at 0x7ffff7ffd000

我写了一个简单的程序,它打印一个字符串并返回.我可以通过输入./a.out"直接执行它.但是当我在 gdb 中运行它时,就会发生上述错误.我尝试使用-g"标志编译代码,但不使用它.两次都给出了相同的结果.谁能帮我解决这个问题??

I wrote a simple program which prints a string and returns. I was able to execute it directly, by typing "./a.out". But when I run it in gdb the error mentioned above happens. I tried compiling the code using the "-g" flag and without using it. Both time it gave the same result. Can anyone help me with this issue??

推荐答案

那个消息,

warning: no loadable sections found in added symbol-file system-supplied 

所以在 0x7ffff7ffd000

SO at 0x7ffff7ffd000

是一个不阻止GCC运行a.out的警告;至少,它不应该.

is a warning that does not prevent GCC from running a.out; at least, it should not.

这是说 a.out 使用的动态加载的对象缺少符号.与 a.out 本身无关.

It is saying that there's a dynamically loaded object used by a.out that is missing symbols. Nothing about a.out itself.

您可以尝试将 a.out 构建为静态可执行文件;像这样:

You can try to build a.out as a static executable; like this:

gcc -static a.c

显然,添加任何其他需要的编译器参数.

Obviously, add any other compiler arguments needed.

作为静态可执行文件,您不会收到来自 GCC 的警告.这些符号可能仍然丢失,但不会影响程序的执行.

As a static executable, you won't get that warning from GCC. Those symbols may still be missing, but it should not affect execution of the program.

这篇关于GDB 警告:在 0x7ffff7ffd000 添加的符号文件系统提供的 DSO 中找不到可加载部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆