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??
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.
It is saying that there's a dynamically loaded object used by a.out that is missing symbols. Nothing about a.out itself. Obviously, add any other compiler arguments needed. As a static executable, you won't get that warning from GCC.
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle. Changing version to '29'.
No, they should not, the rpm messages could be disabled by adding to the beginning of GDB command line: -iex 'set build-id-verbose 0' (In reply to Jan Kratochvil from comment #4 ) Thank you for the hint!
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With