[LC++]need help on .so files

Filipe Sousa filipe.gr.sousa at alunos.ipb.pt
Wed Aug 25 01:16:01 UTC 2004


On Tuesday 24 August 2004 16:16, Jack Lloyd wrote:
> There is no such thing, basically. By default, all symbols all exported

With gcc (at leat with gcc 3.4) you can set the symbol visibility to hidden 
with the flag -fvisibility=hidden and choose what to export with visibility 
attribute:

#define NO_EXPORT __attribute__ ((visibility("hidden")))
#define EXPORT    __attribute__ ((visibility("default")))

> from a shared object (thank Eris -- dll{export,import} are a PITA). You
> *can* control this using special ELF-specific commands, though (I think).
> The only application I can think of that might do this is glibc, I know it
> does a lot of strange ELF symbol manipulation.
>
> Just in the off chance you are using this for 'security' purposes, I'll
> point out that an application can still access said functions if it's
> motivated enough (search through the .so, find out where the function is,
> and cast that value to a function pointer).
>
> -Jack
>
> On Tue, Aug 24, 2004 at 09:17:43AM -0000, shrikant vishwanathan wrote:
> >  ?
> > hi,
> > Anyone knows what is the equivalent of dllexport and dllimport(in Windos)
> > in linux. I need selective exporting of library functions to the
> > application.
> >
> > thanx for the time
> >
> > Regards,
> > Shrikant
>
> _______________________________________________
> This is the Linux C++ Programming List
>
> : http://lists.linux.org.au/listinfo/tuxcpprogramming List

Filipe Sousa

-- 
Imagine if every Thursday your shoes exploded if you tied them the usual
way.  This happens to us all the time with computers, and nobody thinks of
complaining.
		-- Jeff Raskin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
Url : http://lists.linux.org.au/pipermail/tuxcpprogramming/attachments/20040825/bb84eabb/attachment.pgp 


More information about the tuxCPProgramming mailing list