In the current design the main executable links explicitly to the module
registration construtors that it uses. This means that they must be
visible in shared libraries.
PR modula2/108259
gcc/m2/ChangeLog:
* gm2-gcc/m2decl.cc (m2decl_DeclareModuleCtor): Make module
registration constructors visible.
/* Declare module_ctor (). */
TREE_PUBLIC (decl) = 1;
DECL_ARTIFICIAL (decl) = 1;
- DECL_VISIBILITY (decl) = VISIBILITY_HIDDEN;
+ DECL_VISIBILITY (decl) = VISIBILITY_DEFAULT;
DECL_VISIBILITY_SPECIFIED (decl) = 1;
DECL_STATIC_CONSTRUCTOR (decl) = 1;
return decl;