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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T06:03:29+00:00 2026-06-15T06:03:29+00:00

Our project (C++, Linux, gcc, PowerPC) consists of several shared libraries. When releasing a

  • 0

Our project (C++, Linux, gcc, PowerPC) consists of several shared libraries. When releasing a new version of the package, only those libs should change whose source code was actually affected. With “change” I mean absolute binary identity (the checksum over the file is compared. Different checksum -> different version according to the policy). (I should mention that the whole project is always built at once, no matter if any code has changed or not per library).

Usually this can by achieved by hiding private parts of the included Header files and not changing the public ones.

However, there was a case where a mere delete was added to the destructor of a class TableManager (in the TableManager.cpp file!) of library libTableManager.so, and yet the binary/checksum of library libB.so (which uses class TableManager ) has changed.

TableManager.h:

class TableManager 
{
public:
    TableManager();
    ~TableManager();
private:
    int* myPtr;
}

TableManager.cpp:

TableManager::~TableManager()
{
    doSomeCleanup();
    delete myPtr;     // this delete has been added
}

By inspecting libB.so with readelf --all libB.so, looking at the .dynsym section, it turned out that the length of all functions, even the dynamically used ones from other libraries, are stored in libB! It looks like this (length is the 668 in the 3rd column):

527: 00000000 668 FUNC GLOBAL DEFAULT UND _ZN12TableManagerD1Ev

So my questions are:

  1. Why is the length of a function actually stored in the client lib? Wouldn’t a start address be sufficient?
  2. Can this be suppressed somehow when compiling/linking of libB.so (kind of “stripping”)? We would really like to reduce this degree of dependency…
  • 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-15T06:03:30+00:00Added an answer on June 15, 2026 at 6:03 am

    Bingo. It is actually kind of a “bug” in binutils which they found and fixed in 2008. The size information is actually not useful!

    What Simon Baldwin wrote in the binutils mailing list describes exactly the problem ( emphases by me):

    Currently, the size of an undefined ELF symbol is copied out of the
    object file or DSO that supplies the symbol, on linking. This size is
    unreliable
    , for example in the case of two DSOs, one linking to the
    other. The lower- level DSO could make an ABI-preserving change that
    alters the symbol size, with no hard requirement to rebuild the
    higher-level DSO. And if the higher- level DSO is rebuilt, tools that
    monitor file checksums will register a change due to the altered size
    of the undefined symbol, even though nothing else about the
    higher-level DSO has altered. This can lead to unnecessary and
    undesirable rebuild and change cascades in checksum-based systems.

    We have the problem with an older system (binutils 2.16). I compared it with version 2.20 on the desktop system and – voilà – the lengths of shared global symbols were 0:

    157: 00000000     0 FUNC    GLOBAL DEFAULT  UND _ZN12TableManagerD1Ev
    158: 00000000     0 FUNC    GLOBAL DEFAULT  UND _ZNSs6assignERKSs@GLIBCXX_3.4 (2)
    159: 00000000     0 FUNC    GLOBAL DEFAULT  UND sleep@GLIBC_2.0 (6)
    160: 00000000     0 FUNC    GLOBAL DEFAULT  UND _ZN4Gpio11setErrorLEDENS_
    

    So I compared both binutils source codes, and – voilà again – there is the fix which Alan suggested in the mailing list:

    enter image description here

    Maybe we just apply the patch and recompile binutils since we need to stay with the olderish platform. Thanks for your patience.

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

Sidebar

Related Questions

We are going to start a new project in our team which consists of
Working under linux for our developement, I have an Eclipse Makefile C Project and
Our project has a trunk. I worked on Branch A, adding several features, and
I'm working on an embedded Linux project. Our build process makes an image that
We our going to start a new project in our small team: It's a
We have a smallish C++ Linux project that accompanies our large C++/MFC Windows project.
In our project now we using log4cxx, but those library don't develope some years,
We have a large set of C++ projects (GCC, Linux, mostly static libraries) with
My boss and I are the only ones working on our project and we
I'm using both TortoiseSVN and svn clinet from Linux prompt. In our project, I

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.