on-internet
← Community

Why doesn't GDB automatically disassemble from RIP if _start symbol is not present?

Stack Overflow ·

In no_start.s: .intel_syntax noprefix mov rdi, 42 mov rax, 60 syscall assembled with as -o no_start.o no_start.s and linked with ld -o no_start no_start.o (ld complains _start is not found and uses the start of .text instead). When I run it in GDB, it fails to disassemble the instructions at RIP automatically and forces me to specify a range: Reading symbols from ./no_start... (No debugging symbols found in ./no_start) (gdb) starti Starting program: no_start Program stopped. 0x0000000000401000 in ?? () (gdb) disas ❌️ No function contains program counter for selected frame. (gdb) disas $rip, +0

Comments

Sign in or sign up to comment and upvote.

No comments yet.