Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7730033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T06:07:17+00:00 2026-06-01T06:07:17+00:00

Suppose we have a shared library named libtest.so, there is one function foo in

  • 0

Suppose we have a shared library named libtest.so, there is one function “foo” in it

use the strip to discards all symbols from libtest.so

$strip libtest.so

so ,now if we use:

$nm libtest.so

it will print out:

nm: libtest.so: no symbols

but if we use :

$readelf -s libtest.so 

foo function still can be seen from its result:

…

10: 000005dc 5 FUNC GLOBAL DEFAULT 12 _Z3foov

…

we also can use command strings to check it:

$strings libtest.so

…

_Z3foov

…

here is my question ,why nm give no result for striped libtest.so?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T06:07:18+00:00Added an answer on June 1, 2026 at 6:07 am

    why nm give no result for striped libtest.so

    There are two symbol tables in the original libtest.so: a “regular” one (in .symtab and .strtab sections) and a dynamic one (in .dynsym and .dynstr sections).

    If strip removed both symbol tables, you library would be completely useless: the dynamic loader couldn’t resolve any symbols in it. So strip does the only thing that makes sense: removes the “regular” symbol table, leaving the dynamic one intact.

    You can see symbols in the dynamic symbol table with nm -D or readelf -s.

    The “regular” symbol table is useful only for debugging (for example, it contains entries for static functions, which are not exported by the library, and do not show up in the dynamic symbol table).

    But the dynamic loader never looks at the “regular” symbol table (which is not in a format suitable for fast symbol lookups); only at the dynamic one. So the “regular” symbol table is not needed for correct program operation, but the dynamic one is.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a shared library which is supposed to export only one function which
I have two scenarios. Suppose I have 3 shared libraries that export C++ symbols,
Suppose I have: Toby Tiny Tory Tily Is there an algorithm that can easily
Suppose I have a table called Companies that has a DepartmentID column. There's also
Suppose we have: interface Foo { bool Func(int x); } class Bar: Foo {
I have problems using a shared library that was linked against a shared library.
Suppose we have a class like: Public Class Question Private Shared _field as Integer
Suppose we have 3 entities: Library, Section & Book. A Library consists of several
Suppose I have two projects. One is an application and the other is a
Suppose we have a shared queue (implemented using an array), which two threads can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.