title: How to hide the exported symbols name within a shared library
body: <p>For VC, I can write a DEF file and use the 'NONAME' directive to leaving only the ordinal number in dll's export table.</p>
  
  <p>How could I do the same thing with gcc and ELF format shared library? </p>
  
  <p>Or, is there something equivalent in ELF shared library like the ordinal number in a PE format DLL? If not, how could I hide the exported symbol's name within a shared library?</p>
  
  <p>======================================</p>
  
  <p><strong>UPDATE:</strong> Some additional descriptions:</p>
  
  <p>In Windows, you can export a function by only place a integer ID (the ordinal) with an empty name. </p>
  
  <p>To show it, the normal layout for a dll's export table looks like this: <a href="http://home.hiwaay.net/~georgech/WhitePapers/Exporting/HowTo22.gif" rel="noreferrer">http://home.hiwaay.net/~georgech/WhitePapers/Exporting/HowTo22.gif</a>.</p>
  
  <p>the "NONAME" one looks like this: <a href="http://home.hiwaay.net/~georgech/WhitePapers/Exporting/HowTo23.gif" rel="noreferrer">http://home.hiwaay.net/~georgech/WhitePapers/Exporting/HowTo23.gif</a>.</p>
  
  <p>Notice the functions name are "N/A" in the second picture. Here is a full explaination of it: hxxp://home.hiwaay.net/~georgech/WhitePapers/Exporting/Exp.htm.</p>
  
  <p>======================================</p>
  
  <p><strong>UPDATE:</strong> A lot of thanks for everyone who make me advice. Finally, I decide to keeping use static library on linux/posix platforms. <em>But extract the small "special part" (which is using some features not suitable for static lib, e.g: TLS Slot, etc.) to a normal shared-library</em>. Because the small normal shared-library only doing few things, and these work are totally insensitive, so there is no need to obscure/hide its APIs.</p>
  
  <p>I think it's the simplest way to solve my problem :-D</p>