Error in the code at 18:15. There is an error in the code displayed at 18:15. execlp function call should contain "./hello" and not "hello". Also - wait() function takes one argument, otherwise it gives error. I used p = wait(Null) to rectify the code and it worked.
Getting Error "readelf: Error: Not an ELF file - it has the wrong magic bytes at the start" after having created the object file using this command - gcc hello.c -c
Found the solution to it. "readelf" does not work in vs code terminal. Now, I am using Kali Linux and write the C code using Vim editor. readelf works as intended in kali linux.
Great content. Any book recommendations would be great.
Very nice presentation on elf loading and how stack is maintained during a function call.
Very nice explanation sir. BTW has the construction completed 😅
Error in the code at 18:15.
There is an error in the code displayed at 18:15. execlp function call should contain "./hello" and not "hello".
Also - wait() function takes one argument, otherwise it gives error. I used p = wait(Null) to rectify the code and it worked.
Getting Error "readelf: Error: Not an ELF file - it has the wrong magic bytes at the start" after having created the object file using this command - gcc hello.c -c
Found the solution to it. "readelf" does not work in vs code terminal. Now, I am using Kali Linux and write the C code using Vim editor. readelf works as intended in kali linux.