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

  • Home
  • SEARCH
  • 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 4610680
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:09:55+00:00 2026-05-22T01:09:55+00:00

Linux binaries are usually dynamically linked to the core system library (libc). This keeps

  • 0

Linux binaries are usually dynamically linked to the core system library (libc). This keeps the memory footprint of the binary quite small but binaries which are dependent on the latest libraries will not run on older systems. Conversely, binaries linked to older libraries will run happily on the latest systems.

Therefore, in order to ensure our application has good coverage during distribution we need to figure out the oldest libc we can support and link our binary against that.

How should we determine the oldest version of libc we can link to?

  • 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-05-22T01:09:55+00:00Added an answer on May 22, 2026 at 1:09 am

    Work out which symbols in your executable are creating the dependency on the undesired version of glibc.

    $ objdump -p myprog
    ...
    Version References:
      required from libc.so.6:
        0x09691972 0x00 05 GLIBC_2.3
        0x09691a75 0x00 03 GLIBC_2.2.5
    
    $ objdump -T myprog | fgrep GLIBC_2.3
    0000000000000000      DF *UND*  0000000000000000  GLIBC_2.3   realpath
    

    Look within the depended-upon library to see if there are any symbols in older versions that you can link against:

    $ objdump -T /lib/libc.so.6 | grep -w realpath
    0000000000105d90 g    DF .text  0000000000000021 (GLIBC_2.2.5) realpath
    000000000003e7b0 g    DF .text  00000000000004bf  GLIBC_2.3   realpath
    

    We’re in luck!

    Request the version from GLIBC_2.2.5 in your code:

    #include <limits.h>
    #include <stdlib.h>
    
    __asm__(".symver realpath,realpath@GLIBC_2.2.5");
    
    int main () {
        realpath ("foo", "bar");
    }
    

    Observe that GLIBC_2.3 is no longer needed:

    $ objdump -p myprog
    ...
    Version References:
      required from libc.so.6:
        0x09691a75 0x00 02 GLIBC_2.2.5
    
    $ objdump -T myprog | grep realpath
    0000000000000000      DF *UND*  0000000000000000  GLIBC_2.2.5 realpath
    

    For further information, see http://web.archive.org/web/20160107032111/http://www.trevorpounds.com/blog/?p=103.

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

Sidebar

Related Questions

Linux provides the stime(2) call to set the system time. However, while this will
I compiled 2 different binaries on the same GNU/Linux server using g++ version 4.2.3.
How can I decompile Linux binaries (*.so) from Windows? Thanks.
I've been using objdump to look at assembly code in Linux ELF binaries. Sometimes
Binaries (under Linux) don't have an extension so I cannot exclude them using patterns.
Does Linux automatically re-claim all memory used by an applications immediately? If so then
On linux, it's possible to create a tun interface using a tun driver which
In Linux, what is the difference between /dev/ttyS0 and /dev/ttys0 ? I know that
On Linux/NPTL , threads are created as some kind of process. I can see
Under Linux, my C++ application is using fork() and execv() to launch multiple instances

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.