Bug 197713 - nasm will not build syslinux on PPC
Summary: nasm will not build syslinux on PPC
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: nasm
Version: 6
Hardware: powerpc
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Petr Machata
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-07-05 18:30 UTC by Bill Jones
Modified: 2015-05-05 01:32 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2006-07-05 19:51:08 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Bill Jones 2006-07-05 18:30:33 UTC
Description of problem:
masm, when trying to compile syslinux (for the LiveCD project) generates an
invalid opcode "jmp"

Version-Release number of selected component (if applicable):
Linux sneex.insecurity.org 2.6.16-1.2289_FC6 ppc
nasm.ppc 0:0.98.39-3.2.1  

How reproducible:
Always

Steps to Reproduce:
1. Get syslinux source
2. execute make
3.  (See additional notes below)
  
Actual results:


Expected results:


Additional info:
[root@sneex syslinux-3.11]# make
rm -f .depend
for csrc in syslxmod.c gethostip.c ; do gcc  -MM $csrc >> .depend ; done
for nsrc in copybs.asm extlinux.asm isolinux.asm isolinux-debug.asm ldlinux.asm
mbr.asm pxelinux.asm ; do nasm -O99 -DDEPEND  -o `echo $nsrc | sed -e
's/\.asm/\.bin/'` -M $nsrc >> .depend ; done
nasm -O99 -f bin -DDATE_STR="'0x43115316'" -DHEXDATE="0x43115316" \
                -DMAP=pxelinux.map -l pxelinux.lst -o pxelinux.bin pxelinux.asm
perl checkov.pl pxelinux.map pxelinux.bin
cp pxelinux.bin pxelinux.0
gcc  -W -Wall -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -c gethostip.c
gcc -O2 -s  gethostip.o   -o gethostip
perl bin2c.pl syslinux_bootsect < ldlinux.bss > bootsect_bin.c
perl bin2c.pl syslinux_ldlinux < ldlinux.sys > ldlinux_bin.c
perl bin2c.pl syslinux_mbr < mbr.bin > mbr_bin.c
perl bin2c.pl extlinux_bootsect < extlinux.bss > extlinux_bss_bin.c
perl bin2c.pl extlinux_image < extlinux.sys > extlinux_sys_bin.c
set -e ; for i in memdisk dos win32 mtools unix extlinux sample com32 ; do make
DATE=0x43115316 HEXDATE=0x43115316 -C $i all ; done
make[1]: Entering directory `/root/syslinux-3.11/memdisk'
Makefile:122: .depend: No such file or directory
rm -f .depend
for csrc in *.c ; do gcc -m32 -ffreestanding -I../com32/include -MM $csrc | sed
-e 's/\.o/\.s/' >> .depend ; done
for ssrc in  ; do gcc -m32 -ffreestanding -I../com32/include -x c -traditional
-MM $ssrc | sed -e 's/\.S16\.o/\.o16/' >> .depend ; done
for nsrc in memdisk.asm memdisk16.asm ; do nasm -O99 -DDEPEND  -o `echo $nsrc |
sed -e 's/\.asm/\.bin/'` -M $nsrc >> .depend ; done
make[1]: Leaving directory `/root/syslinux-3.11/memdisk'
make[1]: Entering directory `/root/syslinux-3.11/memdisk'
nasm -O99 -f bin -dVERSION='"3.11"' -dDATE='"0x43115316"'  -o memdisk16.bin -l
memdisk16.lst memdisk16.asm
gcc -m32 -ffreestanding    -c -o start32.o start32.S
start32.S: Assembler messages:
start32.S:9: Error: Unrecognized opcode: `jmp'
make[1]: *** [start32.o] Error 1
make[1]: Leaving directory `/root/syslinux-3.11/memdisk'
make: *** [all] Error 2

Comment 1 Petr Machata 2006-07-05 19:51:08 UTC
The file start32.S, where the error appears, is part of syslinux package, not
generated in any way by nasm.  nasm is only used to compile (x86) assembly files
to (x86) object files.  Native GNU assembler, that is fired as part of syslinux
compilation, expects ppc instructions, but start32.S is again x86 assembly. 
That's why it bails out with an error.

In short, syslinux is pretty much x86-centric package.  It's not surprising that
it doesn't compile on ppc, and it isn't nasm's fault.


Note You need to log in before you can comment on or make changes to this bug.