Date: Thu, 31 Jul 1997 10:51:47 -0700 From: John Polstra <jdp@polstra.com> To: Terry Lambert <terry@lambert.org> Cc: msmith@atrad.adelaide.edu.au, current@FreeBSD.ORG Subject: Re: pccard and -current; a long way to go. :-( Message-ID: <199707311751.KAA06386@austin.polstra.com> In-Reply-To: Your message of "Wed, 30 Jul 1997 10:05:24 PDT." <199707301705.KAA05229@phaeton.artisoft.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> > not. (The usual reply to this is "let's just make our ELF tools
> > prepend the underscore too," although I bet you know better than
> > that. You're not allowed to do it because the ELF spec says you
> > can't. If we want ELF, then let's have ELF and not elf.out or
> > a.elf.)
>
> Don't be so sure that I am not an "underscore advocate". There's
> plenty of code that distinguishes the assembly from the C symbol
> name space using underscores... the non-underscore functions are
> a means of providing duplicate symbol hiding.
Sorry, but for me this issue is non-negotiable. From the ELF spec:
External C symbols have the same names in C, assembly code, and
object files' symbol tables.
If you add the underscore, it's not ELF.
> In many cases, the removal of the C symbol underscore is BAD(tm),
> in that it causes a collision with an assembly function of the same
> name.
In ELF, global assembly language symbols that are intended to be
hidden from C generally look like ".foo". It's just a different
convention, that's all. I like the ELF convention better, because
it eliminates all confusion about whether you should pass "foo" or
"_foo" to functions like dlopen() and nlist().
--
John Polstra jdp@polstra.com
John D. Polstra & Co., Inc. Seattle, Washington USA
"Self-knowledge is always bad news." -- John Barth
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199707311751.KAA06386>
