Have no idea without source.
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.
Have no idea without source.
eXMMS and Rockbox running on E680, E680i, E680g, A780, A1200 and ROKR E6
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 nothingOriginally Posted by vvb5
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![]()