Subject: Xen, static global variables and libkvm
To: None <tech-kern@netbsd.org>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-kern
Date: 10/13/2005 17:34:17
Hi,
it seems that the Xen ELF loader doesn't load the global variables with
local symbols (declared static in the source code, and shown by nm with
'b' instead of 'B') in the kernel's symbol table:
janus:/etc/xen/kernels#netstat -g
ip_mrtproto: symbol not in namelist
miftable: symbol not in namelist
(really, netstat is looking for mif6table, as read in the sources).
janus:/etc/xen/kernels#netstat -N /netbsd -g
ip_mrtproto: symbol not in namelist

IPv6 Multicast Interface Table is empty

IPv6 Multicast Routing Table is empty

janus:/etc/xen/kernels#nm /netbsd |grep mif6table
c04c88c0 b mif6table

What shall we do about this ?
a) say that Xen's elf loader is wrong and try to fix it
b) change
  static struct mif6 mif6table[MAXMIFS];
  to
  struct mif6 mif6table[MAXMIFS];
  and other static variables used by KVM grovelers

I did b), it works. But maybe a) is the real solution.

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--