Question

We have a application of size about 20MB in release mode. This application is meant to run on MIPS running Linux 2.6.12 The debug build of the same is about 42 MB, with optimization switched off and -g flag added. The additional 22 MB increase is only because of gdb debug symbols embedded into the application (no logs or print statements added).

Now will debug build run slower than the image compared to release mode, if yes why ?

Also AFAIK strip debug_image should give me release_image, but in my case I observe following.

debug_image = 42MB
strip debug_image = 24MB
release_image = 20MB

Why is there a difference between stripped debug_image and release_image ?

Are there any other side effects embedding gdb symbols into application ?

Était-ce utile?

La solution

Now will debug build run slower than the image compared to release mode, if yes why ?

Yes it will, if optimizations are off, which is true in your case.

Why is there a difference between stripped debug_image and release_image ?

Because of optimizations are on in release, the whole image size is optimized, reducing it. This results to less image size in release than in debug.

Are there any other side effects embedding gdb symbols into application ?

It will take longer time for gdb to load symbols and more memory will be required.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top