title: Access #ident information in an executable?
body: <p>gcc (and other compilers) <a href="http://gcc.gnu.org/onlinedocs/cpp/Other-Directives.html#Other-Directives" rel="nofollow">support</a> the #ident preprocessor directive:</p>
  
  <blockquote>
    <p>The ‘#ident’ directive takes one argument, a string constant. On some
    systems, that string constant is copied into a special segment of the
    object file. On other systems, the directive is ignored. The ‘#sccs’
    directive is a synonym for ‘#ident’.</p>
  </blockquote>
  
  <p>And I see (with a hex dump) that by e.g. adding this to a source file:</p>
  
  <pre><code>#ident "Hello there !" 
  </code></pre>
  
  <p>This string gets embedded in the executable.</p>
  
  <p>Now, are there any tools (readelf,objdump, gdb or others) that can extract/view these strings ?</p>