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'sdependencies (the way MS link does)


Hi Guys,

> Ian Lance Taylor <ian@airs.com> writes:

> Also, at least for newer versions of the program linker and the
> dynamic linker, you can use the option ``-z now'' to set a flag in
> the executable which tells the dynamic linker to effectively use
> RTLD_NOW.  This is documented in a rather cryptic manner in the
> linker manual and in ld's --help output.

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

The patch also tidies up the rest of the section describing the -z
switch so that each keyword is an item in a list.

Cheers
        Nick

2003-08-14  Nick Clifton  <nickc@redhat.com>

	* ld.texinfo (Options): Put keywords for the -z option into a
          table.  Add more text describing what the -z now option
          does.

Index: ld/ld.texinfo
===================================================================
RCS file: /cvs/src/src/ld/ld.texinfo,v
retrieving revision 1.96
diff -c -3 -p -r1.96 ld.texinfo
*** ld/ld.texinfo	27 Jul 2003 11:58:28 -0000	1.96
--- ld/ld.texinfo	14 Aug 2003 18:00:19 -0000
*************** for Solaris compatibility.
*** 875,903 ****
  
  @kindex -z @var{keyword}
  @item -z @var{keyword}
! The recognized keywords are @code{initfirst}, @code{interpose},
! @code{loadfltr}, @code{nodefaultlib}, @code{nodelete}, @code{nodlopen},
! @code{nodump}, @code{now}, @code{origin}, @code{combreloc}, @code{nocombreloc} 
! and @code{nocopyreloc}.
! The other keywords are
! ignored for Solaris compatibility. @code{initfirst} marks the object
! to be initialized first at runtime before any other objects.
! @code{interpose} marks the object that its symbol table interposes
! before all symbols but the primary executable. @code{loadfltr} marks
! the object that its filtees be processed immediately at runtime.
! @code{nodefaultlib} marks the object that the search for dependencies
! of this object will ignore any default library search paths.
! @code{nodelete} marks the object shouldn't be unloaded at runtime.
! @code{nodlopen} marks the object not available to @code{dlopen}.
! @code{nodump} marks the object can not be dumped by @code{dldump}.
! @code{now} marks the object with the non-lazy runtime binding.
! @code{origin} marks the object may contain $ORIGIN.
! @code{defs} disallows undefined symbols.
! @code{muldefs} allows multiple definitions.
! @code{combreloc} combines multiple reloc sections and sorts them
! to make dynamic symbol lookup caching possible.
! @code{nocombreloc} disables multiple reloc sections combining.
! @code{nocopyreloc} disables production of copy relocs.
  
  @kindex -(
  @cindex groups of archives
--- 875,936 ----
  
  @kindex -z @var{keyword}
  @item -z @var{keyword}
! The recognized keywords are:
! @table @samp
! 
! @item combreloc
! Combines multiple reloc sections and sorts them to make dynamic symbol
! lookup caching possible.
! 
! @item defs
! Dsallows undefined symbols.
! 
! @item initfirst
! Marks the object to be initialized first at runtime before any other
! objects.
! 
! @item interpose
! Marks the object that its symbol table interposes before all symbols
! but the primary executable.
! 
! @item loadfltr
! Marks  the object that its filtees be processed immediately at
! runtime.
! 
! @item muldefs
! Allows multiple definitions.
! 
! @item nocombreloc
! Disables multiple reloc sections combining.
! 
! @item nocopyreloc
! Disables production of copy relocs.
! 
! @item nodefaultlib
! Marks the object that the search for dependencies of this object will
! ignore any default library search paths.
! 
! @item nodelete
! Marks the object shouldn't be unloaded at runtime.
! 
! @item nodlopen
! Marks the object not available to @code{dlopen}.
! 
! @item nodump
! Marks the object can not be dumped by @code{dldump}.
! 
! @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.
! 
! @item origin
! Marks the object may contain $ORIGIN.
! 
! @end table
! 
! Other keywords are ignored for Solaris compatibility.  
  
  @kindex -(
  @cindex groups of archives
        


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