I was trying to use the "info files" command on a very simple ELF file
generated by the following bash/fasm command:
fasm /dev/stdin test <<< $'format ELF executable\nint3'
When run via GDB and inspected with "info files" command, I get no
information about the file:
$ gdb -q -ex 'info files' ./test
Reading symbols from ./test...
(No debugging symbols found in ./test)
Symbols from "/tmp/test".
For comparison, trying this command on /bin/true gives me not only
sections names, but also file type and entry point:
$ gdb -q -ex 'info files' /bin/true
Reading symbols from /bin/true...
Symbols from "/bin/true".
Local exec file:
`/bin/true', file type elf32-i386.
Entry point: 0x8048e40
0x08048154 - 0x08048167 is .interp
0x08048168 - 0x08048188 is .note.ABI-tag
0x08048188 - 0x080482fc is .hash
0x080482fc - 0x0804865c is .dynsym
Is it supposed to work as such, or is it a bug worth reporting? If
it's supposed to be so, then what is the rationale for omitting file
type and entry point from the info about such simple files as my test
For reference, here's the content of the test case file generated by
the above given fasm command: