AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
 View Only
  • 1.  Aix flag to reduce size of shared file

    Posted Mon October 21, 2013 06:22 AM

    Originally posted by: abhi_joshi04


    I am using xlC (Version: 11.01.0000.0011).

    While build i am using "-g" to have debug information in build.
    there are many object files (>500) due to which resultant shared file (.so) will have huge size.

    I can't reduce optimization level.
    Is there any way or flag is present by using which i can reduce size of shared file (.so)?


    #AIX-Forum


  • 2.  Re: Aix flag to reduce size of shared file

    Posted Mon October 21, 2013 06:48 AM

    Originally posted by: Wouter Liefting


    Does "strip" help? There are flags that preserve the debug information.


    #AIX-Forum


  • 3.  Re: Aix flag to reduce size of shared file

    Posted Tue October 22, 2013 02:16 AM

    Originally posted by: abhi_joshi04


    Thanks Wouter for ans.

    I tried that but first of all some debug info will be removed using "strip" .

    Also my file size if 2.3 GB while I do

    strip -t -X 64 <file_name>

    It will give error "0654-406 Internal error while reading file tables. There is not enough memory available "

    or if i try:

    strip -H -X 64 <file_name>

    it simply says: Segmentation fault 

     

     


    #AIX-Forum


  • 4.  Re: Aix flag to reduce size of shared file

    Posted Tue October 22, 2013 11:21 AM

    Originally posted by: Wouter Liefting


    Mmm. How about you strip the 500+ object files before linking them into the shared object file? Does that work?

    I'm still wondering why you include the debug information into what I think is the final, installable product though. It's not common practice AFAIK. And does the 2.3 GB object file really cause problems? After all, the shared library loader will only page-in those pages of the 2.3 GB that are actually needed.

    And how about spreading the 500+ object files across a larger number of .so files?


    #AIX-Forum


  • 5.  Re: Aix flag to reduce size of shared file

    Posted Wed October 23, 2013 02:03 PM

    Originally posted by: abhi_joshi04


    Thanks Wouter.

    I have two builds. My optimized builds are working fine but debug build is giving prob.

    Trying to build it with stripping object files.

    Anyway is there some way with which i can link file size of more than 2GB?

    Currently its giving error to link this file (file with size 2.3GB) so I am trying to reduce its size.

    But if there is any way by which we can link file with this size that would be best option.

     


    #AIX-Forum


  • 6.  Re: Aix flag to reduce size of shared file

    Posted Wed October 23, 2013 04:10 PM

    Originally posted by: Wouter Liefting


    Sorry, I'm out of ideas here. The only thing I can think of is to split your project into smaller chunks somehow. There is no technical requirement why all your stuff needs to be linked into one big .so file. Programs are perfectly happy dealing with dozens of different .so files simultaneously. Sure, it may be easier and more convenient for the builder/packager, but there is no technical reason for it.


    #AIX-Forum