News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Assembly program without syscall for Linux

Started by Jokovich, December 24, 2020, 12:37:53 AM

Previous topic - Next topic

Jokovich

Hello everyone, this is my first post here.                                                                                                                            192.168.1.1         
Is it possible to write a simple assembly program that does nothing and exits immediately, without calling syscalls in Linux?
Thank.                                                                                                                                                                                                                             
     

mineiro

hello sir Jokovich;
By syscall I'm suppose that you are on linux x86-64.
You can call exit function from C library, but, I suppose that internally that do a syscall to exit.
If you're assembling (main) and linking using C library you can do a simple program that have only "ret" instruction that will work, but again, I suppose that internally a syscall to exit is done.
I was thinking in kill signal, terminate process, and other things that I need learn, but, others members are better than me on linux, wait for other answers.
I'd rather be this ambulant metamorphosis than to have that old opinion about everything

TouEnMasm

Quote
without calling syscalls in Linux?
Perhaps it's not the best forum to get an answer on linux ?.
Fa is a musical note to play with CL

mabdelouahab

.code
main proc systemv
xor eax,eax
ret
main endp
end

DebugBSD

Quote from: Jokovich on December 24, 2020, 12:37:53 AM
Hello everyone, this is my first post here.
Is it possible to write a simple assembly program that does nothing and exits immediately, without calling syscalls in Linux?
Thank.

Yes, it's possible, but, unless you're using masm on Linux (which it's not possible at all) or maybe Uasm? you should tell us, which kind of assembler are you using?

masm != nasm != gasm != whatever assembler tool :D
Happy Hacking!

deeR44

Quoteand exits immediately, without calling syscalls in Linux?
Thank.

I'll bet that you would have more luck with this on a LINUX forum somewhere else.