This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How do I link to a shared lib without having that lib's dependencies (the way MS link does)


Nick Clifton <nickc@redhat.com> writes:

> As a first step towards resolving this issue, here is a patch to
> update the documentation describing -z now.  Is my wording correct ?

Cool.

I'd say that all of this needs more work--it's still pretty cryptic,
even to me.  I mean, what the heck does -z initfirst actually do?

> ! @item now
> ! Marks the object with the as requiring non-lazy runtime binding.
> ! This overrides the runtime linker's default behaviour and will force
> ! any process that dynamically links to the object to load and bind all
> ! functions in the object as soon as it it referenced.

Not quite right because -z now is meaningful for executables also.  I
would say something more like (stealing from the ld.so man page
description of LD_BIND_NOW):

When generating an executable or shared library, mark it to tell the
dynamic linker to resolve all symbols when the program is started, or
when the shared library is linked to using dlopen, instead of
deferring function call resolval to the point when the function is
first called.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]