flat assembler
Message board for the users of flat assembler.

Index > Unix > FreeBSD 6.2 AMD64 Ports Segmentation fault (core dumped)

Author
Thread Post new topic Reply to topic
codsna



Joined: 08 Aug 2007
Posts: 10
codsna 08 Aug 2007, 19:10
use:
uname -a
FreeBSD server.localdomain 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 08:32:24 UTC 2007 root@portnoy.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64

ports:
/usr/ports/lang/fasm

version: fasm-1.67.21

make install clean

got some:

cd /usr/ports/lang/fasm/work/fasm && cc -O2 -fno-strict-aliasing -pipe fasm.o -o fasm
/usr/bin/ld: warning: i386 architecture of input file `fasm.o' is incompatible with i386:x86-64 output

and run fasm:
got:

Segmentation fault (core dumped)

please help! Idea

_________________
CODSNA
Post 08 Aug 2007, 19:10
View user's profile Send private message Reply with quote
mattst88



Joined: 12 May 2006
Posts: 260
Location: South Carolina
mattst88 08 Aug 2007, 20:47
It looks like the object is a i386 ELF binary file, but you're trying to link it as an x86-64 ELF executable.

Add -m32 to the compiler flags and see if that allows it to link correctly.

Remember, there isn't a 64-bit version of fasm.
Post 08 Aug 2007, 20:47
View user's profile Send private message Visit poster's website Reply with quote
codsna



Joined: 08 Aug 2007
Posts: 10
codsna 09 Aug 2007, 05:51
Many thanks, mattst88
Post 09 Aug 2007, 05:51
View user's profile Send private message Reply with quote
codsna



Joined: 08 Aug 2007
Posts: 10
codsna 09 Aug 2007, 20:47
/usr/bin/ld -V -m elf_i386_fbsd -dynamic-linker /libexec/ld-elf.so.1 /usr/lib32/
crt1.o /usr/lib32/crti.o /usr/lib32/crtbegin.o /usr/lib32/crtend.o /usr/lib32/cr
tn.o -L/usr/lib32 -lc -lgcc fasm.o -o fasm

Eventually, It works with this. (for fasm-1.67.22.tar.gz /libc version)
but need to install /usr/lib32
Post 09 Aug 2007, 20:47
View user's profile Send private message 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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.