Join Today
+ Reply to Thread
Results 1 to 4 of 4
  1. #1

    Default Object files are too big...

    I'm having a problem with the object files generated from a project build. This .cpp file is about 1.8KB and its corresponding object file compiles to an enormous 88KB. I'm dynamically linking to shared libraries so this is not the problem (as I'm not using static linking). Has anyone encountered this problem before? Of course the project isn't a single file but quite alot and there are header dependencies but that again can't be the problem; every .cpp file should be independent with it's object file and thus can't produce this big an object file. I don't know what's going on but the executable is very big (over 5MB) which is not acceptable on the mobile. Any advice?

    I should not that I'm using the same procedure to build the project as with building the sample files which come with the SDK, and the object file generated from the hello app is small and only double the size of the cpp but not like 80 times bigger.

  2. #2
    Join Date
    Sep 2005
    Location
    Jakarta, Indonesia
    Posts
    1,091

    Default Re: Object files are too big...

    Have no idea without source.
    eXMMS and Rockbox running on E680, E680i, E680g, A780, A1200 and ROKR E6

  3. #3

    Default Re: Object files are too big...

    prolly debugging symbol stuff - try your crosstool's strip utility.

  4. #4

    Default Re: Object files are too big...

    Quote Originally Posted by vvb5
    prolly debugging symbol stuff - try your crosstool's strip utility.
    well i've reduced about 1mb from the whole 5mb using that tool; the 88kb file reduces to 64kb...i've used the -g and -x options of the strip utility...actually the file reduces to 40kb if i run the tool without specifiying any options, the tool's default action (-s), but then i get linker errors that's why i had to specify the specific options above myself...not exactly what i'm aiming for but i guess 1mb is better than nothing

    edit:
    i guess i found out the problem:
    i used a file global.h that was included with almost every other file, this file contained lots of "defined" const variables...their definitions were simply included in all the files that relied on that global.h causing the explosive size growth of the object files...i then only "declared" these variables as extern in the same global.h file and defined their values in a single source file...and the size of the once 88kb object file reduced to a mere 5.5kb! and yet another 3mb was blown away


 
+ Reply to Thread

Similar Threads

  1. need help big problem
    By yogi0106 in forum E6 General Chat
    Replies: 7
    Last Post: 01-07-2009, 05:19 AM
  2. Does the A1200 offer OBJECT PUSH PROFILE?
    By jmarione in forum A1200 General Chat
    Replies: 0
    Last Post: 07-18-2008, 01:36 AM
  3. Replies: 0
    Last Post: 05-28-2006, 11:37 AM
  4. 2 big forums with lots of files..
    By ycyas in forum E680i General Chat
    Replies: 9
    Last Post: 04-04-2006, 07:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Single Sign On provided by vBSSO

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1