flat assembler
Message board for the users of flat assembler.

Index > Unix > running linux fasm in OpenBSD

Author
Thread Post new topic Reply to topic
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8353
Location: Kraków, Poland
Tomasz Grysztar 19 Jan 2005, 15:01
With the changes I've made to the latest interface versions I have managed to run the Linux version of fasm in OpenBSD. Here are the steps you have to do (assuming you have downloaded and unpacked the fasm for Linux).

1) Enable linux emulation. This will work only if your kernel supports this, but since the generic OpenBSD kernel includes this option, executing this command should be enough:
Code:
sysctl kern.emul.linux=1    

For more details look here.

2) Mark the executable as Linux one, in OpenBSD you do it with this command:
Code:
elf2olf -o linux fasm    


And that's all - you should be able to run the fasm executable now.
Post 19 Jan 2005, 15:01
View user's profile Send private message Visit poster's website Reply with quote
maslan



Joined: 08 Sep 2003
Posts: 54
maslan 31 Aug 2005, 23:07
That's Great this can also be done in freebsd with brandelf
but fasm can't ouput bsd elf so the executable should also be passed to brandelf.
why can't u add a format for bsd for e.g.
format elf_freebsd executable
Really fasm proves that portablility is not a C thing Wink

_________________
Maslan
I'm searching for perfection so, even if u need portability u 've to use Assembly
---
http://www.maslanlab.org
---
http://libosdk.berlios.de
http://maslanedit.sf.net
http://maslancms.sf.net
Post 31 Aug 2005, 23:07
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8353
Location: Kraków, Poland
Tomasz Grysztar 01 Sep 2005, 09:03
See the new Unix/libc package in Download section.
Post 01 Sep 2005, 09:03
View user's profile Send private message Visit poster's website Reply with quote
maslan



Joined: 08 Sep 2003
Posts: 54
maslan 01 Sep 2005, 13:44
i know i just found it Wink
but u mean that fasm/libc version will output elf object that can be linked with the libc ?

_________________
Maslan
I'm searching for perfection so, even if u need portability u 've to use Assembly
---
http://www.maslanlab.org
---
http://libosdk.berlios.de
http://maslanedit.sf.net
http://maslancms.sf.net
Post 01 Sep 2005, 13:44
View user's profile Send private message Reply with quote
RedGhost



Joined: 18 May 2005
Posts: 443
Location: BC, Canada
RedGhost 10 Nov 2005, 09:20
Tomasz Grysztar wrote:
See the new Unix/libc package in Download section.


fasm just keeps expanding Razz

_________________
redghost.ca
Post 10 Nov 2005, 09:20
View user's profile Send private message AIM Address MSN Messenger Reply with quote
weiss



Joined: 03 Jan 2006
Posts: 25
weiss 10 Jan 2006, 09:59
I have installed OpenBSD 3.6 recently for AMD64..will try this later.
Post 10 Jan 2006, 09:59
View user's profile Send private message Reply with quote
weiss



Joined: 03 Jan 2006
Posts: 25
weiss 10 Jan 2006, 15:52
OK, i've encountered a problem on the amd64 with fasm.
The fasm.o assembles, but it crashes when i run it.

i tried the sysctl kern.emul.linux=1 & it doesn't exist in the GENERIC kernel or /etc/sysctl.conf file anywhere.

i was gonna modify the fasm code just to get it running, but maybe there is better way to sort this out.
Post 10 Jan 2006, 15:52
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8353
Location: Kraków, Poland
Tomasz Grysztar 10 Jan 2006, 16:45
As fasm itself is 32-bit code, so it needs to be linked with 32-bit variant of libc - this may be the problem on 64-bit systems. I don't have one, so I had no chance to try it yet.
Post 10 Jan 2006, 16:45
View user's profile Send private message Visit poster's website 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 © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.