I wrote a simple c program and tried to use GDB to debug the program. I understand the use of the following functions:
Enter
push %ebp mov %esp,%ebp
Upon exit
leave ret
Then I tried gdb on _start and I got the following
xor %ebp,%ebp pop %esi mov %esp,%ecx and $0xfffffff0,%esp push %eax push %esp push %edx push $0x80484d0 push $0x8048470 push %ecx push %esi push $0x8048414 call 0x8048328 <__libc_start_main@plt> hlt nop nop nop nop
I can not understand these lines and the logic of this.
Can anyone give any recommendations to help explain the code _start?
_start
Here is a well-commented > code that you posted.
To summarize, he performs the following actions:
esi
__libc_start_main
__libc_csu_fini
__libc_csu_init
main
hlt
nop
gnu _start . , C , , /, - , :
int x = 5; int y; int fun ( void ) { static int z; }
x, y, z , . , , x, 5, , y . , , , ( ) _start main().
/, gnu _start. , , main() ++, , C.
Source: https://habr.com/ru/post/1629657/More articles:most significant vs least significant sorting - sortingProblems with Android Bluetooth Gatt Server / Client Simultaneous connection - androidwhat's the difference between profitability and profitability in python 3.3.2+ - pythonBluetooth Bluetooth connection without user Enter the PIN code and confirmation using the Android API - androidASP.NET 5 (MVC6) EF7 foreign key can cause loops - asp.netIs there any way to return the downloaded files to the user? - elixirC ++ 0x auto cannot print function vector pointer type - c ++How to create a custom send type with custom fields through WP REST API V2 - wordpressCan I save text structure with Google Cloud Vision TEXT_DETECTION? - google-cloud-visionCloudWatch login from EC2 instances - asynchronousAll Articles