Hi,

On Mon, 15 May 2000, Richard Henderson wrote:
> Incidentally, version maps do support
> 
>       extern "C++" {
>         some_class::function
>         other_class::*
>       }
> 
> though you can't export just one flavour of overridden
> function that way.

Now that's even cooler ;) If it would work. With the following map:
libtest {
  global:
    extern "C++" {
      Global::*
    };
  local:
    *;
};

ld segfaults. (And it does not recognize the '::' in Global::) It
segfaults because the yacc rule for parsing the "extern" declaration is
wrong. For both problems is a small diff in the attachment. With that I'm
nearly wishless happy ;) (for ELF at least)


Ciao,
Michael.
--- /big/2/src/cygnus/sourceware/src/ld/ldgram.y        Mon Mar  6 03:26:13 2000
+++ ldgram.y    Wed May 17 01:31:20 2000
@@ -1113,6 +1113,7 @@
                        }
                vers_defns '}'
                        {
+                         $$ = $5;
                          ldgram_vers_current_lang = $<name>4;
                        }
        ;
--- /big/2/src/cygnus/sourceware/src/ld/ldlex.l Mon May  3 09:29:06 1999
+++ ldlex.l     Wed May 17 01:26:45 2000
@@ -115,7 +115,7 @@
 NOCFILENAMECHAR        [_a-zA-Z0-9\/\.\-\_\+\$\:\[\]\\\~]
 
 V_TAG [.$_a-zA-Z][._a-zA-Z0-9]*
-V_IDENTIFIER [*?.$_a-zA-Z][*?.$_a-zA-Z0-9]*
+V_IDENTIFIER [*?.$_a-zA-Z]([*?.$_a-zA-Z0-9]|::)*
 
 %s SCRIPT
 %s EXPRESSION

Reply via email to