On Fri, Sep 05, 2008 at 05:56:02PM -0700, Alan Irwin wrote:
> Revision 8753 makes infrastructure available to
> play with gcc-4.x visibility following what was done for the Windows compiler
> cases and following the ideas in http://gcc.gnu.org/wiki/Visibility.
> 
> The idea here is any symbol marked as PLDLLIMPEXP is definitely exported,
> but the other symbols visibility is either default (exported) or hidden
> depending on how whether the gcc visibility pragma is either pushed as
> "(default)" (which was committed so the export situation remains the same as
> before, i.e., all symbols are exported) or "(hidden)".  To get the latter
> behaviour, change what is commented out for the pragma in include/plplot.h.
> 
> There is a problem with the "(hidden)" case.  Here is the libplplotd
> result:
> 
> nm -a src/libplplotd.so |grep ' t ' |grep ' c_'
> 00000000000205c3 t c_plcol0
> 0000000000045e74 t c_plenvi
> 000000000001f893 t c_plgfci
> 0000000000023d1c t c_plgra
> 000000000002280c t c_plscmap0n
> 0000000000020a02 t c_plscol0
> 000000000001c91c t c_plsdiori
> 0000000000023de5 t c_pltext
> 
> So for some reason those particular symbols are local rather than exported.
> OTOH, c_plcol1, for example is a "T" which means it is exported properly.
> Currently I cannot spot any differences between e.g., the way plcol0 and
> plcol1 are treated in our source code for libplplot.  Can somebody clue me
> in about that?
> 
> Until we get this sorted out we should continue to use the "(default)"
> pragma rather than the "(hidden)" one in the committed version of plplot.h,
> but certainly feel free to experiment locally with the "(hidden)" version.

Alan,

I've tested the "(hidden)" version with gcc 4.2.3 on Ubuntu (intel 32
bit) and I can confirm a similar issue with some (but not all) symbols 
being local exported. I have a rather longer list than you though which
is odd and suggests it may not just be a problem with our source.

I also encountered a problem with the python module. Linking
_plplotcmodule.so fails with all the plplot library symbols giving
undefined references, not just those marked "t". Similar problems
occurs with tcl, gnome2 and ocaml. Linking the fortran, octave and 
ada libraries was successful though. 

Once I started on the drivers these also all began to fail with
undefined references and also an ld error along the line of

/usr/bin/ld: ps.so: hidden symbol `c_plsdiori' isn't defined
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status

At this point I gave up the experiment.

I will investigate further as time allows.

Andrew

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to