[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug in GNU as when performing backwards jump to label on FreeBSD
From: |
Patrick McMunn |
Subject: |
Bug in GNU as when performing backwards jump to label on FreeBSD |
Date: |
Sun, 6 Sep 2020 00:44:47 -0500 |
I'm working with a developer of the Dosemu2 project to get the software
ported to FreeBSD. The software currently works on Linux. However, the
assembly code which compiles and runs fine on Linux produces a compilation
error on FreeBSD. as 2.17.50 and 2.33.1 have both been tested, and both
produce the same error. The operating system is FreeBSD 12.1-STABLE
r364789. The Compiler is Clang 10.0.1.
The last output from gmake is
cc -E -imacros config.hh -MMD -DCFLAGS_STR="-Wall -Wstrict-prototypes
-Wmissing-declarations -Wnested-externs -fms-extensions -pthread
-Wno-unused-result -Wcast-qual -Wwrite-strings -Wno-string-plus-int
-Wno-address-of-packed-member -fno-stack-protector -Wno-microsoft
-Wno-incompatible-pointer-types -Wno-address-of-packed-member -fpie -O2
" -I../../../src/include -I../../../src/plugin/include
-I../../../src/base/bios/x86
-I/home/patrick/work/dosemu2-working/src/include
-I/home/patrick/work/dosemu2-working/src/base/lib -I. -x
assembler-with-cpp bootnorm.s | as --32 -o bootnorm.o
bootnorm.s: Assembler messages:
bootnorm.s:36: Error: suffix or operands invalid for `jmp'
gmake[2]: ***
[/home/patrick/work/dosemu2-working/src/Makefile.common.post:89:
bootnorm.o] Error 1
rm bootsect.bin bootsect.elf
gmake[2]: Leaving directory
'/usr/home/patrick/work/dosemu2-working/src/plugin/periph'
gmake[1]: ***
[/home/patrick/work/dosemu2-working/src/arch/linux/Makefile.main:103:
plugin/periph] Error 2
gmake[1]: Leaving directory '/usr/home/patrick/work/dosemu2-working/src'
gmake: *** [Makefile:29: default] Error 2
The snippet of code below is from ./src/plugin/periph/bootnorm.s and is
what s leading to the error:
#
# normal DOS boot sector
#
.intel_syntax noprefix
.text
.code16
.globl _start16
_start16:
#-----------------------------------------------------------------------
# ENTRY (copied from freedos bootsector)
#
# IN: DL = boot drive
#OUT: DL = boot drive
#
#-----------------------------------------------------------------------
real_start: cli
cld
xor ax, ax
mov ds, ax
mov bp, 0x7c00
mov ss, ax # initialize stack
lea sp, [bp-0x20]
sti
mov ax, 0x1FE0
mov es, ax
mov si, bp
mov di, bp
mov cx, 0x0100
rep movsw
jmp 0x1FE0:0x7c00+ cont-real_start
The home for the project is https://github.com/dosemu2/dosemu2
I tried Googling for help, and I turned up nothing for FreeBSD. However, I
did turn up some info for MacOS (which shares some code with FreeBSD), and
apparently the issue exists on MacOS also:
https://discussions.apple.com/thread/2149747?tstart=0
--
Patrick McMunn
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Bug in GNU as when performing backwards jump to label on FreeBSD,
Patrick McMunn <=