From owner-freebsd-arch Mon Jan 22 11:38: 3 2001 Delivered-To: freebsd-arch@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id 546E537B402 for ; Mon, 22 Jan 2001 11:37:44 -0800 (PST) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.9.3/8.9.3) id OAA40991; Mon, 22 Jan 2001 14:37:36 -0500 (EST) (envelope-from wollman) Date: Mon, 22 Jan 2001 14:37:36 -0500 (EST) From: Garrett Wollman Message-Id: <200101221937.OAA40991@khavrinen.lcs.mit.edu> To: n@nectar.com Cc: arch@freebsd.org Subject: Re: other approach for hiding names (was Re: Request For Review: libc/libc_r changes to allow -lc_r) X-Newsgroups: mit.lcs.mail.freebsd-arch In-Reply-To: References: Organization: MIT Laboratory for Computer Science Cc: Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In article you write: >Is there somewhere in the build process that we could insert a tool >that does something like the following? > > for each externally visible symbol: This is not unlike what `crunch' does, so it's not impossible. >[1] Actually this list would probably be all ISO C names + other > symbols that require special handling for threads. Or whatever. Actually, no. The only symbols that need to be hidden are the ones actually used inside libc. There are different levels of hiding necessary; for functions used internal to the implementation of the ISO C standard library, all non-ISO-reserved names must be hidden, but for functions used to implement POSIX libraries, only non-POSIX-reserved names (a much smaller set) must be hidden. Of course, it may be more convenient to just do everything. In no circumstances do we need to hide a function that is used solely as an external interface; the linker will (read: is supposed to) do the Right Thing and resolve program-local references using such names to the program and not the library. -GAWollman -- Garrett A. Wollman | O Siem / We are all family / O Siem / We're all the same wollman@lcs.mit.edu | O Siem / The fires of freedom Opinions not those of| Dance in the burning flame MIT, LCS, CRS, or NSA| - Susan Aglukark and Chad Irschick To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message