I am very new to Linux but I am not new to programming, so with that in mind understand me when I say that I cannot find anyone who can understand or help me with this super elementary programming problem so this is my last resort (which is why I didn't even know where to post this in this forum)...
PROGRAM ONE
PROGRAM TWO
PROGRAM ONE will assemble and link without any errors or warnings, and disassembles correctly. PROGRAM TWO will assemble and link without any errors or warnings, but I cannot disassemble it because it won't load it, giving the error message "Failed to open and attach to process: execv() failed: No such file or directory". What file? What directory? There is not enough info given to troubleshoot this issue, there is very little info on the Internet concerning this issue, and what little there is disinformation or useless guessing. Funny thing is, if I change the link command for PROGRAM ONE to "ld -o Example Example.o -lc -ecrt0", it will fail the same as PROGRAM TWO.
NOTE:
I am using EDB for disassembly.
I am using Mx Linux, if that matters.
"whereis libc" shows libc is installed and working (of course).
Some related questions:
Is this a runtime issue? Do I need to setup some kind of developer environment for this to work?
What is missing from ALL the tutorials that they aren't telling us so this very elementary program will run?
PROGRAM ONE
;***************************************************************************
; Assemble : nasm -felf64 Example.asm
; Link : ld -o Example Example.o -ecrt0
;***************************************************************************
global crt0
section .text
crt0:
call crt0
ret
PROGRAM TWO
;***************************************************************************
; Assemble : nasm -felf64 Example.asm
; Link : ld -o Example Example.o -lc -ecrt0
;***************************************************************************
extern printf
global crt0
section .text
crt0:
call printf
ret
PROGRAM ONE will assemble and link without any errors or warnings, and disassembles correctly. PROGRAM TWO will assemble and link without any errors or warnings, but I cannot disassemble it because it won't load it, giving the error message "Failed to open and attach to process: execv() failed: No such file or directory". What file? What directory? There is not enough info given to troubleshoot this issue, there is very little info on the Internet concerning this issue, and what little there is disinformation or useless guessing. Funny thing is, if I change the link command for PROGRAM ONE to "ld -o Example Example.o -lc -ecrt0", it will fail the same as PROGRAM TWO.
NOTE:
I am using EDB for disassembly.
I am using Mx Linux, if that matters.
"whereis libc" shows libc is installed and working (of course).
Some related questions:
Is this a runtime issue? Do I need to setup some kind of developer environment for this to work?
What is missing from ALL the tutorials that they aren't telling us so this very elementary program will run?
Last edited: