Why nm shows no symbols for /lib/i386-linux-gnu/libc.so.6?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
16
down vote

favorite
3












I expected to see number of symbols in the libc.so.6 file including printf. I used the nm tool to find them, however it says there is no symbol in libc.so.6.










share|improve this question























  • Does not matter. But it is Debian.
    – masec
    May 14 '16 at 5:14















up vote
16
down vote

favorite
3












I expected to see number of symbols in the libc.so.6 file including printf. I used the nm tool to find them, however it says there is no symbol in libc.so.6.










share|improve this question























  • Does not matter. But it is Debian.
    – masec
    May 14 '16 at 5:14













up vote
16
down vote

favorite
3









up vote
16
down vote

favorite
3






3





I expected to see number of symbols in the libc.so.6 file including printf. I used the nm tool to find them, however it says there is no symbol in libc.so.6.










share|improve this question















I expected to see number of symbols in the libc.so.6 file including printf. I used the nm tool to find them, however it says there is no symbol in libc.so.6.







linux shared-library symbol-table nm






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 12 '16 at 2:50









Jeff Schaller

34.2k951113




34.2k951113










asked May 11 '16 at 20:48









masec

12019




12019











  • Does not matter. But it is Debian.
    – masec
    May 14 '16 at 5:14

















  • Does not matter. But it is Debian.
    – masec
    May 14 '16 at 5:14
















Does not matter. But it is Debian.
– masec
May 14 '16 at 5:14





Does not matter. But it is Debian.
– masec
May 14 '16 at 5:14











3 Answers
3






active

oldest

votes

















up vote
31
down vote



accepted










It's probably got its regular symbols stripped and what's left is its dynamic symbols, which you can get with nm -D.






share|improve this answer



























    up vote
    0
    down vote













    Find out if it is a shared object, or, a regular ASCII file. If it is a shared object you should see "ELF 32-bit LSB shared object,"



    file /lib/i386-linux-gnu/libc.so.6





    share|improve this answer




















    • libc.so.6 is oviously a shared object.
      – Gilles
      May 11 '16 at 22:24










    • I never assume in a Linux environment. Considering someone could have touched the root directories. Yes, by name it is obviously a share object. And, it doesn't hurt to verify; when you are not getting the expected output.
      – jncc99
      May 11 '16 at 23:42

















    up vote
    0
    down vote













    @PSkocik answered this. I just want to add more detail. There are two kinds of symbol sections in ELF: .symtab and .dynsym (see LSB_5.0.0 for detail). .symtab is for the linking step of the shared lib itself. Once linking is finished, .symtab section is not needed anymore. .dynsym section contains important symbols that are supposed to be searched by dynamic linker at running time. nm by default only dump symbols in .symtab section.



    LSB_5.0.0 10.2.2.1 says a conforming shared lib should have either .symtab or .dynsym but not both. As part of the ABI library, libc is stripped out of the .symtab to be spec conforming.





    share








    New contributor




    kula85 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.

















      Your Answer







      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "106"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      convertImagesToLinks: false,
      noModals: false,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













       

      draft saved


      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f282616%2fwhy-nm-shows-no-symbols-for-lib-i386-linux-gnu-libc-so-6%23new-answer', 'question_page');

      );

      Post as a guest






























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      31
      down vote



      accepted










      It's probably got its regular symbols stripped and what's left is its dynamic symbols, which you can get with nm -D.






      share|improve this answer
























        up vote
        31
        down vote



        accepted










        It's probably got its regular symbols stripped and what's left is its dynamic symbols, which you can get with nm -D.






        share|improve this answer






















          up vote
          31
          down vote



          accepted







          up vote
          31
          down vote



          accepted






          It's probably got its regular symbols stripped and what's left is its dynamic symbols, which you can get with nm -D.






          share|improve this answer












          It's probably got its regular symbols stripped and what's left is its dynamic symbols, which you can get with nm -D.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered May 11 '16 at 20:53









          PSkocik

          17.4k34893




          17.4k34893






















              up vote
              0
              down vote













              Find out if it is a shared object, or, a regular ASCII file. If it is a shared object you should see "ELF 32-bit LSB shared object,"



              file /lib/i386-linux-gnu/libc.so.6





              share|improve this answer




















              • libc.so.6 is oviously a shared object.
                – Gilles
                May 11 '16 at 22:24










              • I never assume in a Linux environment. Considering someone could have touched the root directories. Yes, by name it is obviously a share object. And, it doesn't hurt to verify; when you are not getting the expected output.
                – jncc99
                May 11 '16 at 23:42














              up vote
              0
              down vote













              Find out if it is a shared object, or, a regular ASCII file. If it is a shared object you should see "ELF 32-bit LSB shared object,"



              file /lib/i386-linux-gnu/libc.so.6





              share|improve this answer




















              • libc.so.6 is oviously a shared object.
                – Gilles
                May 11 '16 at 22:24










              • I never assume in a Linux environment. Considering someone could have touched the root directories. Yes, by name it is obviously a share object. And, it doesn't hurt to verify; when you are not getting the expected output.
                – jncc99
                May 11 '16 at 23:42












              up vote
              0
              down vote










              up vote
              0
              down vote









              Find out if it is a shared object, or, a regular ASCII file. If it is a shared object you should see "ELF 32-bit LSB shared object,"



              file /lib/i386-linux-gnu/libc.so.6





              share|improve this answer












              Find out if it is a shared object, or, a regular ASCII file. If it is a shared object you should see "ELF 32-bit LSB shared object,"



              file /lib/i386-linux-gnu/libc.so.6






              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered May 11 '16 at 22:16









              jncc99

              364




              364











              • libc.so.6 is oviously a shared object.
                – Gilles
                May 11 '16 at 22:24










              • I never assume in a Linux environment. Considering someone could have touched the root directories. Yes, by name it is obviously a share object. And, it doesn't hurt to verify; when you are not getting the expected output.
                – jncc99
                May 11 '16 at 23:42
















              • libc.so.6 is oviously a shared object.
                – Gilles
                May 11 '16 at 22:24










              • I never assume in a Linux environment. Considering someone could have touched the root directories. Yes, by name it is obviously a share object. And, it doesn't hurt to verify; when you are not getting the expected output.
                – jncc99
                May 11 '16 at 23:42















              libc.so.6 is oviously a shared object.
              – Gilles
              May 11 '16 at 22:24




              libc.so.6 is oviously a shared object.
              – Gilles
              May 11 '16 at 22:24












              I never assume in a Linux environment. Considering someone could have touched the root directories. Yes, by name it is obviously a share object. And, it doesn't hurt to verify; when you are not getting the expected output.
              – jncc99
              May 11 '16 at 23:42




              I never assume in a Linux environment. Considering someone could have touched the root directories. Yes, by name it is obviously a share object. And, it doesn't hurt to verify; when you are not getting the expected output.
              – jncc99
              May 11 '16 at 23:42










              up vote
              0
              down vote













              @PSkocik answered this. I just want to add more detail. There are two kinds of symbol sections in ELF: .symtab and .dynsym (see LSB_5.0.0 for detail). .symtab is for the linking step of the shared lib itself. Once linking is finished, .symtab section is not needed anymore. .dynsym section contains important symbols that are supposed to be searched by dynamic linker at running time. nm by default only dump symbols in .symtab section.



              LSB_5.0.0 10.2.2.1 says a conforming shared lib should have either .symtab or .dynsym but not both. As part of the ABI library, libc is stripped out of the .symtab to be spec conforming.





              share








              New contributor




              kula85 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.





















                up vote
                0
                down vote













                @PSkocik answered this. I just want to add more detail. There are two kinds of symbol sections in ELF: .symtab and .dynsym (see LSB_5.0.0 for detail). .symtab is for the linking step of the shared lib itself. Once linking is finished, .symtab section is not needed anymore. .dynsym section contains important symbols that are supposed to be searched by dynamic linker at running time. nm by default only dump symbols in .symtab section.



                LSB_5.0.0 10.2.2.1 says a conforming shared lib should have either .symtab or .dynsym but not both. As part of the ABI library, libc is stripped out of the .symtab to be spec conforming.





                share








                New contributor




                kula85 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.



















                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  @PSkocik answered this. I just want to add more detail. There are two kinds of symbol sections in ELF: .symtab and .dynsym (see LSB_5.0.0 for detail). .symtab is for the linking step of the shared lib itself. Once linking is finished, .symtab section is not needed anymore. .dynsym section contains important symbols that are supposed to be searched by dynamic linker at running time. nm by default only dump symbols in .symtab section.



                  LSB_5.0.0 10.2.2.1 says a conforming shared lib should have either .symtab or .dynsym but not both. As part of the ABI library, libc is stripped out of the .symtab to be spec conforming.





                  share








                  New contributor




                  kula85 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  @PSkocik answered this. I just want to add more detail. There are two kinds of symbol sections in ELF: .symtab and .dynsym (see LSB_5.0.0 for detail). .symtab is for the linking step of the shared lib itself. Once linking is finished, .symtab section is not needed anymore. .dynsym section contains important symbols that are supposed to be searched by dynamic linker at running time. nm by default only dump symbols in .symtab section.



                  LSB_5.0.0 10.2.2.1 says a conforming shared lib should have either .symtab or .dynsym but not both. As part of the ABI library, libc is stripped out of the .symtab to be spec conforming.






                  share








                  New contributor




                  kula85 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.








                  share


                  share






                  New contributor




                  kula85 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  answered 4 mins ago









                  kula85

                  1




                  1




                  New contributor




                  kula85 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.





                  New contributor





                  kula85 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.






                  kula85 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.



























                       

                      draft saved


                      draft discarded















































                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f282616%2fwhy-nm-shows-no-symbols-for-lib-i386-linux-gnu-libc-so-6%23new-answer', 'question_page');

                      );

                      Post as a guest













































































                      Popular posts from this blog

                      How to check contact read email or not when send email to Individual?

                      Displaying single band from multi-band raster using QGIS

                      How many registers does an x86_64 CPU actually have?