Home > Mobile >  Why does GDB say that this address is being called
Why does GDB say that this address is being called

Time:02-24

I made a very simple C program to print "hello world" to the screen. But in the disassembly, I noticed something strange.

test.c:

#include <unistd.h>
#include <stdlib.h>

int main() {
    write(1, "hello, world\n", 14);
    exit(0);
}

First, I compile with gcc ./test.c and get the binary a.out. Perfectly normal.

Then I launch gdb with gdb ./a.out and set the first breakpoint to _start with b _start

I type r and dissasemble the _start function with disass

My start function looks like this:

Dump of assembler code for function _start:
=> 0x0000555555555050 < 0>:     endbr64 
   0x0000555555555054 < 4>:     xor               
  • Related