Subject: Re: Kernel compiling
To: None <port-arm32@NetBSD.ORG>
From: Mark Brinicombe <amb@physig4.ph.kcl.ac.uk>
List: port-arm32
Date: 10/22/1996 18:44:39
Hi,
  The problem with LKMs is the NetBSD linker not -fpic

LKM's  are not position independant. The basic principle of LKM's is
that space is allocated in the kernel for the module and then the module is
linked using /netbsd to resolve undefined symbols.
i.e. the LKM can be linked to an absolute address and is not shared.

-fpic is needed for shared libraries as shared libraries may be in different
places in different processes thus needing to be position independant.

-fpic is going to have to wait to a later version of gcc.

LKM's are close.
Currently The GNU binutils linker is used for NetBSD/arm32 rather than
the NetBSD linker.
(Current the only tools that are not the NetBSD ones are ld and as)
The NetBSD linker can be built and in fact is required to build
certain code (e.g. cc1plus in the netbsd source tree) but it is bugged.
So far it appears to work fine for user code (I have not had any problems)
but when used on the kernel it results in a kernel that does not work.
As soon as I trck down the problem LKM's will be viabale.

Cheers,
				Mark
Mark Brinicombe				amb@physig.ph.kcl.ac.uk
Research Associate			http://www.ph.kcl.ac.uk/~amb/
Department of Physics			tel: 0171 873 2894
King's College London			fax: 0171 873 2716