I'm trying to use the GNU readline library in a program written in FASM. This is my assembly code:
format elf64
public _start
extrn readline
section ".text" executable
_start:
push prompt
call readline
jmp _start
section ".data"
prompt db ">> ", 0
Then I compile and link it as follows:
$ fasm test.asm
$ ld -lreadline test.o -o test
However when I try to execute ./test
bash gives me the following error message:
bash: ./test: No such file or directory
The test
executable is present in the directory. What's wrong? Am I not linking the libreadline
library correctly?