Subject: Problem on cross-m68k-netbsdelf compiler
To: None <port-m68k@netbsd.org>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: tech-toolchain
Date: 01/17/2001 21:25:36
I'm working on making cross-m68k-netbsdelf package.
http://www.ceres.dti.ne.jp/~tsutsui/netbsd/m68k-netbsdelf.diff

It seems almost working, but there are some problems.
On compiling an ELF kernel for news68k, ld complains about:

/usr/pkg/cross/bin/m68k-netbsdelf-ld -n -Ttext 0 -e start -S -o netbsd \
${SYSTEM_OBJ} vers.o
/usr/pkg/cross/bin/m68k-netbsdelf-ld: Warning: size of symbol `prtactive' \
changed from 8 to 4 in vfs_subr.o
/usr/pkg/cross/bin/m68k-netbsdelf-ld: Warning: size of symbol `safepri' \
changed from 8 to 4 in machdep.o
/usr/pkg/cross/bin/m68k-netbsdelf-ld: Warning: size of symbol `constty' \
changed from 8 to 4 in cons.o

All these variables are defined in different places:

cd9660_node.o:
0000000000000008 C prtactive
vfs_subr.o:
0000000000000068 D prtactive

kern_synch.o:
0000000000000008 C safepri
machdep.o:
0000000000000018 D safepri

cons.o:
0000000000000000 D constty
subr_prf.o:
0000000000000008 C constty

It looks the problem is ld allocates 8 bytes for int values in BSS.
Any suggestions?

BTW, is it possible to use an m68k ELF kernel (with COMPAT_AOUT_M68K)
on a.out userland? When I tried it, some binaries (ifconfig, route etc.)
did not work. I'm wondering if it is compiler problem or kernel problem.
---
Izumi Tsutsui
tsutsui@ceres.dti.ne.jp