Martin Bochnig wrote:
> Martin Bochnig wrote:
> 
>> Cyril Plisko wrote:
>>
>>> Hi,
>>>
>>> GNU ld specialists out there - this question is for you.
>>> what is the GNU ld way of doing -Nmisc/somemod dependency
>>> for relocatable object ? Quick scan of the man page brought
>>> nothing and I am thinking really slow - it is almost 01:00 AM here.
>>>
>>>
>>> -- 
>>> Regards,
>>>        Cyril
>>>  
>>>
>>
>>
>> I'm not a gnu-ld expert at all, but maybe
>> "*--as-needed"   ??
>>
>> *
>>
> GNU-ld:
> 
> --as-needed
> --no-as-needed
>    This option affects ELF DT_NEEDED tags for dynamic libraries 
> mentioned on the command line after the --as-needed option. Normally, 
> the linker will add a DT_NEEDED tag for each dynamic library mentioned 
> on the command line, regardless of whether the library is actually 
> needed. --as-needed causes DT_NEEDED tags to only be emitted for 
> libraries that satisfy some reference from regular objects. 
> --no-as-needed restores the default behaviour.
> --add-needed
> --no-add-needed
>    This option affects the treatment of dynamic libraries from ELF 
> DT_NEEDED tags in dynamic libraries mentioned on the command line after 
> the --no-add-needed option. Normally, the linker will add a DT_NEEDED 
> tag for each dynamic library from DT_NEEDED tags. --no-add-needed causes 
> DT_NEEDED tags will never be emitted for those libraries from DT_NEEDED 
> tags. --add-needed restores the default behaviour.
> 
> 
> 
> SUN-ld:
> 
> -N string
> 
>         This option causes a DT_NEEDED entry to be added to  the
>         .dynamic section of the object being built. The value of
>         the DT_NEEDED string is the string that is specified  on
>         the command line. This option is position dependent, and
>         the DT_NEEDED .dynamic entry is relative  to  the  other
>         dynamic  dependencies  discovered on the link-edit line.
>         This option is useful for specifying dependencies within
>         device driver relocatable objects when combined with the
>         -dy and -r options.
> 
> 
> 
> martin
> 

Interesting...
Can --as-needed add whatever I want or is it kinda of automatic scoop -
adds everything is sees by itself ?


Reply via email to