Reputation: 1210
I am making an rpm of my shared library. In the .spec file, I am writing the normal install commands in %install part ,making some soft links, running ldconfig on %post and %postun. I am not building library in rpm because I already have compiled and stripped library with me. But it happens that when I see the file size of the library(in my development folder) before installing my shared library with rpm, its 24k and when I see the deployed file of my shared library on /usr/lib64/, the size is around 23.8k due to which the hashes of library before deployment and after deployment doesnt match (which I need to match at the moment). What can be problem?
Any help would be appreciated.
edit: I have stat both library files. Shared library file before deployment is 8 blocks more than the file after deploying through rpm.
Upvotes: 2
Views: 1238
Reputation: 9260
There are various possibilities as to what is causing the change...
The first is that RPM may be stripping some of the symbols - if there are symbols for internal functions which are not exported then it may choose to strip them.
It may also be removing various ELF sections from the file because RPM will normally try and extract any debug information into separate files which will then be placed in a separate debuginfo package. Even if you don't have any actual debug information in the library it may still have empty debug sections which are being removed by this process.
The best way to work out what is changing is to explore the two versions of the library with readelf
and see if the list of sections (reported by readelf -S
) or symbols (reported by readelf -s
) have changed.
Upvotes: 4