protect __dso_handle

Mark Mitchell mark@codesourcery.com
Tue Apr 4 23:23:00 GMT 2000


>>>>> "Ulrich" == Ulrich Drepper <drepper@redhat.com> writes:

    Ulrich> Mark Mitchell <mark@codesourcery.com> writes:

    >> Please intall it, with one minor change: let's call the macro
    >> `HAVE_AS_HIDDEN', not `HAVE_GAS_HIDDEN' -- it seems entirely
    >> possible that some other assembler would implement the same
    >> syntax.

    Ulrich> But it should not be named HAVE_AS_HIDDEN until there is
    Ulrich> really another assembler.  Unfortunately this is not
    Ulrich> standardized.  I would prefer to stay with GAS in the
    Ulrich> macro name, at least for now.

This is not a very big deal.

But I don't follow your logic.  The idea behind autoconf is that it's
easy to go to a new system because you don't constrain yourself.  For
example, if only version 2.2.9 or later of the Linux kernel has a
function `foo', we just use autoconf to define `HAVE_FOO'.  That way,
if another system (say Solaris) implements `foo' we're all set.  It
doesn't make sense to call it `HAVE_LINUX_FOO' because there's nothing
inherently Linux-specific about `foo' -- it just happens that only
Linux has implemented `foo' at this point.

I believe a similar argument applies here.  

Why choose a name that will become confusing when another assembler
implements this feature?  If you're worried that another assembler
will allow this syntax, but use it to mean something else, that's a
semi-plausible possibility.  In that case, the autoconf test should
explicitly check that the assembler in use is `gas', and then it would
make sense to name the macro as you suggest.

But, I think the chances of another assembler accepting this syntax,
but having different semantics for it, are slim.  So, I still think we
should go with HAS_AS_HIDDEN.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com


More information about the Gcc-patches mailing list