vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| We have a library build on aix. The one our admin built is sitting on our production node and is one size. It's built with the Visual age C++ compiler (it's a .a file, archive I believe). Someone else built the same library using make files on the machine that has the source code under source code control. They where not sure why the make file rebuilt the common library and they saw that the common library that got built was a different size than the one that the admin had built before. This caused some concern and no one understood why this occured. I used nm on both libraries and diffed the output of both nm commands and got alot of differences but I observed that it appeared to do with ordering and if I first sorted these there was no differences at all. My impression was then that somehow the object files linked in in a different order and some complexity beyond my understanding with the library file caused the size difference which appeared to be a substantial difference. I think I found a web page on the internal format which is XCOFF ? It looks fairly complex. |
| ||||
| wbsurfver@yahoo.com wrote: > I used nm on both libraries and diffed the output of both nm commands > and got alot of differences but I observed that it appeared to do with > ordering and if I first sorted these > there was no differences at all. My impression was then that > somehow the object files linked in in a different order and some > complexity beyond my understanding with the library file > caused the size difference which appeared to be a substantial > difference. I think I found a web page on the internal format which is > XCOFF ? It looks fairly complex. > If an archive contains a file, and your replace (ar r) that file with an updated version, and the new version doesn't fit in the same space as the old, the new version will be appended to the end of the archive. A hole is left where the old version was (ie. it's deleted, but the archive isn't "squished". There's an ar option you can use to rebuild the archive, which would remove all the holes. The short answer is, if you want to ensure comparable results, always build the archive from scratch. Never update it. (Presuming this is the actual issue, which is not guaranteed, but just a suggestion.) -- Gary R. Hook __________________________________________________ ______________________ Vocatus atque non vocatus deus aderit |
| Thread Tools | |
| Display Modes | |
|
|