From owner-freebsd-hackers Sat May 29 12:28:30 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from cs.rice.edu (cs.rice.edu [128.42.1.30]) by hub.freebsd.org (Postfix) with ESMTP id 6E08E14C97 for ; Sat, 29 May 1999 12:28:27 -0700 (PDT) (envelope-from aron@cs.rice.edu) Received: (from aron@localhost) by cs.rice.edu (8.9.0/8.9.0) id OAA15760; Sat, 29 May 1999 14:28:24 -0500 (CDT) From: Mohit Aron Message-Id: <199905291928.OAA15760@cs.rice.edu> Subject: Re: symorder for FreeBSD-3.x To: des@flood.ping.uio.no (Dag-Erling Smorgrav) Date: Sat, 29 May 1999 14:28:24 -0500 (CDT) Cc: freebsd-hackers@freebsd.org In-Reply-To: from "Dag-Erling Smorgrav" at May 29, 99 03:14:05 am X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > COFF? FreeBSD never supported COFF, to the best of my knowledge. > Sorry, should've said a.out. > You might want to take a look at objcopy(1). > I was interested in functionality given by 'symorder -c' that can localize all function and data definitions in an object file. objcopy() does have a '-L' option that can do this on a per symbol basis, but there seems to be no way of localizing all the symbols (barring the cumbersome specification of all global symbols using -L to objcopy). I was looking for the above functionality for localizing symbol definitions in kernel modules so that they don't conflict with the default kernel. For example, if loading an alternate network stack as a module, several global definitions can conflict with those in the kernel (e.g. tcp_input(), ...). However, I discovered that kldload doesn't care about such conflicts and simply goes ahead and loads the module anyway even if there are conflicting symbol definitions in the module (the lkm modload used to complain about this). I don't know whether this is an elf feature or a bug. Can someone clarify ? - Mohit To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message