From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 3 20:44:08 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 652C816A4CE for ; Thu, 3 Mar 2005 20:44:08 +0000 (GMT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8826C43D5C for ; Thu, 3 Mar 2005 20:44:07 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.1) id j23Ki3xt009510; Thu, 3 Mar 2005 14:44:03 -0600 (CST) (envelope-from dan) Date: Thu, 3 Mar 2005 14:44:03 -0600 From: Dan Nelson To: Ashwin Chandra Message-ID: <20050303204402.GC72017@dan.emsphone.com> References: <000c01c5202b$fada24d0$abe243a4@ash> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000c01c5202b$fada24d0$abe243a4@ash> X-OS: FreeBSD 5.3-STABLE X-message-flag: Outlook Error User-Agent: Mutt/1.5.8i cc: freebsd-hackers@freebsd.org Subject: Re: Libc X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Mar 2005 20:44:08 -0000 In the last episode (Mar 03), Ashwin Chandra said: > if we broke libc, and we cannot do anything at the prompt > /libexec/ld-elf.so.1: Shared object "libc.so.5" not found.. > > what is the quick fix for this? Use the statically-linked binaries in /rescue/* to mount a remote filesystem (or floppy or usb drive) and copy libc.so.5 from there. I always copy libc.so.5 to libc.so.5.bak before installing a new version, so I can immediately back it out if it causes problems. > also what is the correct way of adding names to system calls in libc > so instead of doing a syscall(445), we can actually call it by name > like,sys_ash(); cd into /sys/kern, edit syscalls.master, then run "make init_sysent.c". That will regnerate a bunch of files, some of which are used to generate the syscall stubs in libc. -- Dan Nelson dnelson@allantgroup.com