Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22102

Build shared Libray on Solaris without .SUNW_syminfo to export

$
0
0

I am using solaris 11.3 on x86, using gcc 4.8.2 to compile.

I compiled the libpng with gcc using the follow parameter:

#Compile flag:#
C_FLAGS =  -m32 -g -fPIC  -Ixxxx  -Ixxxx
C_DEFINES = -D__GNU__ -Dpng16_EXPORT

#Link flag:#
/usr/bin/gcc  -fPIC  -m32 -g -shared -Wl,-hlibpng16.so -o ../xxxx/libpng16.so  ...

the compilation can ok. When I using the elfdump command, there is nothing to export.

#elfdump -y libpng.so#

there is nothing to export.

But when I use the elfdump to dump other system libraries. There is .SUNW_syminfo to export.

like:(elfdump -y libGL.so)  
Syminfo Section:  .SUNW_syminfo

   index  flags  dynndx boundto          symbol

     [1]  DB            <self>           glDebugMessageControlARB
     [2]  DB            <self>           glAlphaFragmentOp3ATI
     [3]  DB            <self>           glColorFragmentOp1ATI
     [4]  DB            <self>           glWindowPos2dMESA
     [5]  DB            <self>           glGetShaderPrecisionFormat
     [6]  DB            <self>           glGetPixelMapusv
     [7]  DB            <self>           glNormalP3uiv

Why my compiled png library doesn't has the .SUNW_syminfo info? How should adjust the compile or link flag to the gcc to get the symbol information.


Viewing all articles
Browse latest Browse all 22102

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>