NASM Forum > Using NASM
GDB "No such file or directory" on NASM file that exists
(1/1)
paml27:
I created this simple NASM program for Ubuntu 18.04 and compiled it to an exe as shown below. When I run with gdb I get "No such file or directory" even though the file exists in the current directory
; Header Section
[BITS 64]
[default rel]
global _start
global NLTK_Gutenberg_fn
extern Lib_Math
section .data align=64
section .rodata align=64
module_name: db 'nltk',0x00
; _________
section .text
; __________
; Main Entry
_start:
push rdi
push rbp
push rbx
lea rdi,[module_name]
call [rel Lib_Math wrt ..got]
NLTK_Gutenberg_fn:
mov rax,0
mov rbx,0
pop rbx
pop rbp
pop rdi
ret
Compile and link:
cd /opt/P01_SH/NLTK_Gutenberg/C_Replica
sudo nasm -f elf64 -g -F dwarf NLTK_Gutenberg-exec.asm
sudo ld NLTK_Gutenberg-exec.o /opt/P01_SH/NLTK_Gutenberg/C_Replica/Python_Math.o -lpython3.8 -ldl -lrt -lpthread -L/usr/lib/python3.8/config-3.8-x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu/ -o NLTK_Gutenberg-exec.exe
cd /opt/P01_SH/NLTK_Gutenberg/C_Replica
gdb NLTK_Gutenberg-exec.exe
I usually create shared objects in NASM and I never have any problems, but with this .exe I am getting the "not found" error and I can't see why.
Thanks.
Frank Kotler:
" gdb ./NLTK_Gutenberg-exec.exe " ?
Current directory not on your path?
Best,
Frank
paml27:
Hi Frank, and thanks for the reply. Sorry for the delay. The problem was the path, and now it's okay.
Elvarushing:
Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xb73c4700 (LWP 7936)] IA__g_list_length (list=0x6e6920) at glist.c:767 767 glist.c: No such file or directory. in glist.c What is it? HP Instant Ink Login
Frank Kotler:
Hi Elvarushing,
Dunno. Is this Nasm issue?
Best,
Frank
Navigation
[0] Message Index
Go to full version