tags:

views:

175

answers:

2

On creating a shared library the ./sl file size is coming out to be greater than 60KB. There are 2 .o files whose total size is over 20KB.

Checked the utlities : ldd and elfdump to determine libraries being referenced. Apart from the original files used I see references of :/usr/ccs/lib/pa20_64/lddstub and SOURCE FILE INFO: movelr1 PA-RISC 2.0 Assembler.

What are the possible reasons for shared lib file size increase ?.

[(Novice in C) : Working on OS : HP Unix 11i V2 PA RISC-64]

A: 

I am not an HP-UX expert but my best guess is that the HP-UX vendor linker is adding some additional stuff to dynamic library it is creating in addition to the 20kB of object files.

You could use the strip(1) utility to make the shared library smaller.

Sean A.O. Harney
A: 

Thanks Sean!, However using the strip utility did effect the file size, ~7KB , but in a small way.

Another option we found was: elfdump -dc TestProg.sl

On doing that we found that system file is included and also the date/time of compilation of the source files. One probability is that the earlier version of the sl file had older version of prog/os system file included and this could be a possible cause in size difference.

The sys file included in shared lib: [movelr1.o]: in the path /usr/lib/pa20_64/milli.a influences the size of the ./sl file created.

techzen