Regarding "-z lazyload" flag in gnu linker

Bhushan Verma bhushan.verma@iap-online.com
Thu Sep 13 01:15:00 GMT 2007


Dear ALL,

I have one requirement to build our linker.
I am using GNU tool chain for cross compiling.
I have one requirement how to  provide  "-z lazyload " options to gnu linker
to build our shared object.
I have gone one document in which this is written that "-z lazyload " option
is not supported in gnu ld.
Is it true? if yes then is there any way how to set this flag values using
gnu linker.

Since Sun Studio compiler/linker support "-z lazyload" option, so I want
same option using gnu ld also..

Here I am giving you more explanation

Case 1: As Building Sun Studio compiler/linker following is output

Dynamic Section:  .dynamic
     index  tag                value
       [0]  POSFLAG_1         0x1                 [ LAZY ]
       [1]  NEEDED            0x8a2              foo.so
       [2]  POSFLAG_1         0x1                 [ LAZY ]
       [3]  NEEDED            0x8c1               bar.so

Case 2: As Building using gnu compiler/linker following is result

Dynamic Section:  .dynamic
     index  tag                value
       [0]  NEEDED            0x1b08              foo.so
       [1]  NEEDED            0x1b16              bar.so


Could any one help me how  I can get the result as in  Case 1.

regards
Bhushan




More information about the Binutils mailing list