From owner-p4-projects@FreeBSD.ORG Tue Apr 6 17:48:39 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 27F6816A4D0; Tue, 6 Apr 2004 17:48:39 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 032AC16A4CE for ; Tue, 6 Apr 2004 17:48:39 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id F0D3043D3F for ; Tue, 6 Apr 2004 17:48:38 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i370lZGe024821 for ; Tue, 6 Apr 2004 17:47:35 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i370lZZ3024818 for perforce@freebsd.org; Tue, 6 Apr 2004 17:47:35 -0700 (PDT) (envelope-from peter@freebsd.org) Date: Tue, 6 Apr 2004 17:47:35 -0700 (PDT) Message-Id: <200404070047.i370lZZ3024818@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 50544 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2004 00:48:39 -0000 http://perforce.freebsd.org/chv.cgi?CH=50544 Change 50544 by peter@peter_daintree on 2004/04/06 17:47:08 mark runtime kldload as done. add new entry for kldxref and loader preload support. Affected files ... .. //depot/projects/hammer/TODO.txt#11 edit Differences ... ==== //depot/projects/hammer/TODO.txt#11 (text+ko) ==== @@ -1,4 +1,4 @@ -$P4: //depot/projects/hammer/TODO.txt#10 $ +$P4: //depot/projects/hammer/TODO.txt#11 $ reread the logs etc and check out the "XXX worry about this later" stuff @@ -7,13 +7,10 @@ USER_LDT (however, there is a syscall to set the %fs and %gs base values to arbitary 64 bit addresses). -kld module support (the elf_machdep.c relocator is wrong, it uses the old value -rather than addends like it should. See alpha/sparc64 for clues.) -XXX: can't do this without hacking binutils. -XXX: no, its worse than that. Its completely impossible with the current -binutils without writing a whole bunch of bfd code. No way in hell. -Instead, just give in and write a .o file loader, eg: the .kld file that -we use as the final step towards producing the .ko file. +kld preload support, teach the loader how to read new-style .ko files, +as well as kldxref. kldxref should be easy, it should be able to just +read the modmetadata section directly, apply the relocs for that section, +and use that to find the pointers to the other sections. finish the missing relocation types in rtld-elf/amd64/reloc.c (easy) @@ -91,3 +88,10 @@ netstat -i coredumps. Investigate. Is this a compiler bug or a libkvm or /dev/kmem bug? +kld module support (the elf_machdep.c relocator is wrong, it uses the old value +rather than addends like it should. See alpha/sparc64 for clues.) +XXX: can't do this without hacking binutils. +XXX: no, its worse than that. Its completely impossible with the current +binutils without writing a whole bunch of bfd code. No way in hell. +Instead, just give in and write a .o file loader, eg: the .kld file that +we use as the final step towards producing the .ko file.