flat assembler
Message board for the users of flat assembler.

flat assembler > Linux > How to execute fasm programs?

Author
Thread Post new topic Reply to topic
kerr



Joined: 24 Feb 2016
Posts: 138
Today I use fasm compile program, all fasm compile program file cannot execute!
ubuntu system execution fasm program appear cannot execute binary file!

_________________
I hope we will be good friends.
Post 01 Mar 2016, 08:56
View user's profile Send private message Reply with quote
alkap



Joined: 18 Feb 2015
Posts: 44
Location: Dnipro, Ukraine
How do you run the executable?
What's the output of the command lines below?
Code:
file your_executable ls -l your_executable
Post 01 Mar 2016, 10:41
View user's profile Send private message Send e-mail Reply with quote
kerr



Joined: 24 Feb 2016
Posts: 138
alkap wrote:
How do you run the executable?
What's the output of the command lines below?
Code:
file your_executable ls -l your_executable


is command execute fasm compile program .show cannot execute binary file!
and all fasm compile program don't execute.

_________________
I hope we will be good friends.
Post 02 Mar 2016, 00:55
View user's profile Send private message Reply with quote
Trinitek



Joined: 06 Nov 2011
Posts: 257
Code:
chmod +x yourBinaryFile
Perhaps?
Post 02 Mar 2016, 03:31
View user's profile Send private message Reply with quote
kerr



Joined: 24 Feb 2016
Posts: 138
Trinitek wrote:
Code:
chmod +x yourBinaryFile
Perhaps?



Oh! NO.....
is cannot compile program i tried.

_________________
I hope we will be good friends.
Post 02 Mar 2016, 05:27
View user's profile Send private message Reply with quote
alkap



Joined: 18 Feb 2015
Posts: 44
Location: Dnipro, Ukraine
How do you compile the program then?
Post 02 Mar 2016, 05:31
View user's profile Send private message Send e-mail Reply with quote
kerr



Joined: 24 Feb 2016
Posts: 138
alkap wrote:
How do you compile the program then?



fasm test.asm
flat assembler version 1.71.39 (16384 kilobytes memory)
3 passes, 159 bytes.


-bash: ./test: can not execute binary file: executable file format error

_________________
I hope we will be good friends.
Post 02 Mar 2016, 08:37
View user's profile Send private message Reply with quote
system error



Joined: 01 Sep 2013
Posts: 671
Code:
./fasm test.asm
Post 02 Mar 2016, 09:15
View user's profile Send private message Reply with quote
alkap



Joined: 18 Feb 2015
Posts: 44
Location: Dnipro, Ukraine
Quote:

fasm test.asm
flat assembler version 1.71.39 (16384 kilobytes memory)
3 passes, 159 bytes.


-bash: ./test: can not execute binary file: executable file format error


Bash is telling you there that you're attempting to run an executable which is not in ELF format.
The problem is in your 'test.asm' format directive. You may verify this by running:
Code:
file test

Make sure your 'format' directive says 'format ELF'.
Post 02 Mar 2016, 12:33
View user's profile Send private message Send e-mail Reply with quote
kerr



Joined: 24 Feb 2016
Posts: 138
system error wrote:
Code:
./fasm test.asm


Oh ,you speak is not right! there is should system error!

_________________
I hope we will be good friends.
Post 03 Mar 2016, 02:03
View user's profile Send private message Reply with quote
kerr



Joined: 24 Feb 2016
Posts: 138
alkap wrote:
Quote:

fasm test.asm
flat assembler version 1.71.39 (16384 kilobytes memory)
3 passes, 159 bytes.


-bash: ./test: can not execute binary file: executable file format error


Bash is telling you there that you're attempting to run an executable which is not in ELF format.
The problem is in your 'test.asm' format directive. You may verify this by running:
Code:
file test

Make sure your 'format' directive says 'format ELF'.




Code is Right ,is Fasm Compile Program Not in command run.
Programs written before Now not run.Show can not execute binary file: executable file format error.
Quote:

file test
test: ELF 32-bit LSB executable, Intel 80386, version 1 (GNU/Linux), statically linked, interpreter \272\014, stripped

Quote:

warning: cannot find entry symbol _start; not setting start address

_________________
I hope we will be good friends.
Post 03 Mar 2016, 02:22
View user's profile Send private message Reply with quote
alkap



Joined: 18 Feb 2015
Posts: 44
Location: Dnipro, Ukraine
Is your Linux system 32, or 64 bit?
Code:
uname -m
Post 03 Mar 2016, 06:16
View user's profile Send private message Send e-mail Reply with quote
kerr



Joined: 24 Feb 2016
Posts: 138
alkap wrote:
Is your Linux system 32, or 64 bit?
Code:
uname -m


is 32bit

_________________
I hope we will be good friends.
Post 03 Mar 2016, 08:44
View user's profile Send private message Reply with quote
alkap



Joined: 18 Feb 2015
Posts: 44
Location: Dnipro, Ukraine
If your 'test.asm' is not too big, perhaps you could post it here, so we could better help you with the trouble you're experiencing.
Post 03 Mar 2016, 09:07
View user's profile Send private message Send e-mail Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >

Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 2004-2018, Tomasz Grysztar.

Powered by rwasa.