0

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) without much loss of debug info?

EDIT
File size if 2.3GB. due to which i can't link it to other places. I need to make it less than 2GB.

Abhi
  • 192
  • 1
  • 4
  • 17

1 Answers1

1

You can specify the linker option -bstabcmpct:2 at link time to compact the debug information in the shared file that is created.

Alternatively, you could specify the linker option -bstabsplit at link time, which will not put the debug information in the shared object that is created, but instead will create a separate file, with the extension ".stab", that contains the debug information. You can then tell dbx to use this .stab file with its -B option.

Dwayne Moore
  • 376
  • 1
  • 2
  • Thx a lot for info. I tried these options. My file size is 2.3GB. when i used "-bstabcmpct:2" it reduced to 2.1Gb but still till won't go less than 2 GB it's not supported by file system and can't link this file to other. and on using "-bstabsplit" its giving "d: 0706-010 The binder was killed by a signal: Segmentation fault". Please help. – Abhi Oct 22 '13 at 09:00
  • Is there any flag with which we can specify size of file to be linked. In other words can I somehow link a file with size 2.3GB? – Abhi Oct 23 '13 at 17:54