Subject: Re: Fix for ksyms in multiboot
To: Julio M. Merino Vidal <jmmv84@gmail.com>
From: Quentin Garnier <cube@cubidou.net>
List: tech-kern
Date: 11/06/2006 00:18:48
--T7mxYSe680VjQnyC
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Nov 05, 2006 at 11:40:32PM +0100, Julio M. Merino Vidal wrote:
> Hello,
>=20
> /dev/ksyms currently does not work when using multiboot because it
> does not initialize the ELF header passed to userland when adding the
> symbol table (it does not call ksyms_hdr_init).
>=20
> I've attached a fix.  Can you think of a cleaner way of addressing
> this?  (I was considering keeping the code all together in
> kern_ksyms.c as MI, but I don't know if that'd be possible given that
> the ELF header contains details about the platform.)

Well, machine/elf_machdep.h ought to contain some information.  E.g.,
ARCH_ELFSIZE and ELFXX_MACHDEP_ID/ELFXX_MACHDEP_ENDIANNESS, but I don't
think that right now you can expect those to be consistent across all
archs.

I don't think it's necessarily better the MI code guesses that kind of
stuff.

--=20
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"You could have made it, spitting out benchmarks
Owe it to yourself not to fail"
Amplifico, Spitting Out Benchmarks, Hometakes Vol. 2, 2005.

--T7mxYSe680VjQnyC
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (NetBSD)

iQEVAwUBRU5xWNgoQloHrPnoAQIpDQf+Kr9Cg3+KqHOheWdJjbF3ZNASuS6M43uq
p0SBo3S6fOxTxcFVRgNpBWqKzEl6+QoVejyasVwWv3FrDjc0Rnv7n7vnRDaAxPM9
nKZT3wVcqi6k7uETN8e/t8fsPzp22n76deEiqRlUsk4UA/NOkHdIBqroGk4cwV0j
hkw+yXBLBIFonU2qLT0E/fiGdcRKZAgTpEXcfvn7femtPMSujIj8B3Vp/+njZ5FG
FIUDYd7b07xaIUaX0LMK28rOjbG7ELPsMn4H9PvEtuMegDg8bnLUFbAkW7Esqiz/
C8qS/GkqLHNFFRxEofS1goBtXRyXWPMrmc1ZEpFzIDnGs0qvC4nxXw==
=VUvu
-----END PGP SIGNATURE-----

--T7mxYSe680VjQnyC--