Linux – GDB Warning: Loadable section not found in added symbol-file system-supplied DSO at 0x7ffff7ffd000

gccgdblinux

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

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??

Best Answer

That message,

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

SO at 0x7ffff7ffd000

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

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

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

gcc -static a.c

Obviously, add any other compiler arguments needed.

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.

Related Topic