Subject: Re: kernel on sparc64 fails to link
To: None <port-sparc64@netbsd.org, current-users@netbsd.org>
From: Andrey Petrov <petrov@netbsd.org>
List: current-users
Date: 10/18/2003 13:02:44
On Sat, Oct 18, 2003 at 08:40:01AM -0400, Sean Davis wrote:
> A kernel on NetBSD/sparc64 (sources as of last night) fails to link with:
> ld -n -T ../../../../arch/sparc64/conf/kern.ldscript -Ttext 01000000 -Tdata 
> 01800000 -e start -S -o netbsd ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o
> consinit.o(.data+0x48): multiple definition of `cn_tab'
> cons.o(.bss+0x8): first defined here
> *** Error code 1
> 
> It appears that cn_tab is being declared as NULL in sys/dev/cons.c, and then
> declared again as &consdev_prom in sys/arch/sparc64/dev/consinit.c. What
> would the proper fix for this be? removing the NULL initializer in cons.c
> allows the kernel to link and boot, but the console hangs on login, and
> ssh-ing in doesn't work either, so that does not seem to be the correct way
> to go. IANAKH, so any help is appreciated.
> 

I don't know original plan for explicit initializing cn_tab,
in my view removing it is correct. W/r your kernel not working,
most likely you need a clean rebuild.

	Andrey