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 8881739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:24:19+00:00 2026-06-14T20:24:19+00:00

For a shared object which is compiled for ARM , calling readelf with -a

  • 0

For a shared object which is compiled for ARM, calling readelf with -a option, displays libraries without version numbers, i.e. libc.so

me@home:~ $ readelf -a shared_object_for_arm | grep "Shared library"
Type:                              DYN (Shared object file)
0x00000001 (NEEDED)                     Shared library: [libc.so]
0x00000001 (NEEDED)                     Shared library: [libm.so]
0x00000001 (NEEDED)                     Shared library: [libGLESv1_CM.so]
0x00000001 (NEEDED)                     Shared library: [libz.so]
0x00000001 (NEEDED)                     Shared library: [liblog.so]

However, when I reapeat same things for a shared object in the system, version numbers are displayed. I also used arm-linux-gnueabi-readlef for the above situation but nothing is changed. I am trying this in a x86 system.

me@home:~ $ readelf -a /usr/lib/libsnmp.so.15 | grep "Shared library"
Type:                              DYN (Shared object file)
0x00000001 (NEEDED)                     Shared library: [libcrypto.so.1.0.0]
0x00000001 (NEEDED)                     Shared library: [libc.so.6]

Is there any other way than readelf to display version numbers?

  • 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-14T20:24:20+00:00Added an answer on June 14, 2026 at 8:24 pm

    You may try eu-readelf from elfutils, but IMHO both just dump whatever is there. If DT_NEEDED entry does not contain string with version, it’s without version. Dynamic section of shared object contains similar DT_SONAME entry. SONAME or Shared Object NAME is some kind of canonical name for shared library (dynamic shared object).

    $ readelf -d /lib64/libc.so.6 | grep SONAME
    0x000000000000000e (SONAME)             Library soname: [libc.so.6]
    
    $ readelf -d /bin/ls | grep NEEDED
    ...
    0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
    

    If you compile against certain library its DT_SONAME entry is copied over into DT_NEEDED entry of binary or shared object you are creating. Upon execution dynamic linker will use DT_NEEDED entry to find a file with that name. AFAIK dynamic linker does not check that DT_SONAME entry of that file, so in theory it doesn’t have to have DT_SONAME at all or it might be different. You only have to make sure that on target system libc.so points to the right library. It might be symlik to libc.so.6, that does not matter.

    To sum it up if one binary is linked against libc.so.6 and the other against libc.so, it can still work as long the actual file with those names are the same or one is the symlink to the other. If you want to check what is actually loaded at runtime ldd is your friend.

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

Sidebar

Related Questions

If I have a class which will be compiled to a shared object. The
I've got a shared object, which I'll call 'libFoo.so', compiled against the NDK. I
I've made a program that uses two shared libraries (which I compiled) and are
I have shared object A.so which statically links to libssl.a & another shared object
I have existing Linux shared object file (shared library) which has been stripped. I
Is it possible to import a shared object (without linking the program with it)
I have one shared object (a.so) which has statically linked (s.so). b.so also has
In the source file (which is from a shared object / DLL), I get
I have a C library, which I build as a shared object for Linux
I have an application a part of which uses shared libraries. These libraries are

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.