Date: Tue, 23 Jan 2001 11:56:13 -0800 (PST) From: John Polstra <jdp@polstra.com> To: arch@freebsd.org Cc: n@nectar.com Subject: Re: other approach for hiding names (was Re: Request For Review: libc/libc_r changes to allow -lc_r) Message-ID: <200101231956.f0NJuDW24253@vashon.polstra.com> In-Reply-To: <20010122120302.A93660@hamlet.nectar.com> References: <20010120153158.A88123@hamlet.nectar.com> <Pine.SUN.3.91.1010120171614.8403A-100000@pcnet1.pcnet.com> <20010122120302.A93660@hamlet.nectar.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In article <20010122120302.A93660@hamlet.nectar.com>, Jacques A. Vidrine <n@nectar.com> wrote: > [I cc'd: jdp directly because he's the person most knowledgeable about > linker issues with which I've corresponded. Hope you don't mind, > John!] No problem, but next time please use "bcc". Once you get on the cc list it's impossible to get off of it again. > I'm beginning to think that the pre-processor is the wrong tool for > the job. It can't tell a function or object declaration from other > tokens. > > Is there somewhere in the build process that we could insert a tool > that does something like the following? > > for each externally visible symbol: > skip symbol if it is reserved (e.g. '_[A-Z_]') > skip symbol if it is not on the ISO C name list [1] > if the symbol is defined in this module: > rename 'symbol' to '__symbol' > add weak reference for 'symbol' -> '__symbol' > else (the symbol is an undefined reference): > rename 'symbol' to '__symbol' I'm really leery of introducing a special tool for this. I think it could cause problems with upgrading from older versions, and would make us needlessly and confusingly different from the other BSDs. Also I think it's a lot clearer to be able to see what is going on by looking at the source files, without having to remember the magic going on behind the scenes. John -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Disappointment is a good sign of basic intelligence." -- Chögyam Trungpa To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200101231956.f0NJuDW24253>