aboutsummaryrefslogtreecommitdiff
path: root/ld/ld.texinfo
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>1999-06-23 11:09:30 +0000
committerMark Mitchell <mark@codesourcery.com>1999-06-23 11:09:30 +0000
commit3dbf70a2184b98af04dfec550fec9ae1a804bdb0 (patch)
tree22f5010221c6a1018cbff701fc44df60fee86d06 /ld/ld.texinfo
parentf0c2e336c82a1b8c7088d07d33e936fabbe1f0ea (diff)
downloadfsf-binutils-gdb-3dbf70a2184b98af04dfec550fec9ae1a804bdb0.zip
fsf-binutils-gdb-3dbf70a2184b98af04dfec550fec9ae1a804bdb0.tar.gz
fsf-binutils-gdb-3dbf70a2184b98af04dfec550fec9ae1a804bdb0.tar.bz2
* ldmain.c (main): Initialize link_info.init_function and
link_info.fini_function. * lexsup.c (OPTION_INIT): New macro. (OPTION_FINI): Likewise. (ld_options): Add descriptions for them. (parse_args): Handle them.
Diffstat (limited to 'ld/ld.texinfo')
-rw-r--r--ld/ld.texinfo16
1 files changed, 16 insertions, 0 deletions
diff --git a/ld/ld.texinfo b/ld/ld.texinfo
index 73dc816..115f7a2 100644
--- a/ld/ld.texinfo
+++ b/ld/ld.texinfo
@@ -404,6 +404,14 @@ purpose: the @code{-b}, @code{--format}, @code{--oformat} options, the
environment variable. The @sc{gnu} linker will ignore the @code{-F}
option when not creating an ELF shared object.
+@cindex finalization function
+@kindex -fini
+@item -fini @var{name}
+When creating an ELF executable or shared object, call NAME when the
+executable or shared object is unloaded, by setting DT_FINI to the
+address of the function. By default, the linker uses @code{_fini} as
+the function to call.
+
@kindex -g
@item -g
Ignored. Provided for compatibility with other tools.
@@ -434,6 +442,14 @@ field rather than the using the file name given to the linker.
@item -i
Perform an incremental link (same as option @samp{-r}).
+@cindex initialization function
+@kindex -init
+@item -init @var{name}
+When creating an ELF executable or shared object, call NAME when the
+executable or shared object is loaded, by setting DT_INIT to the address
+of the function. By default, the linker uses @code{_init} as the
+function to call.
+
@cindex archive files, from cmd line
@kindex -l@var{archive}
@kindex --library=@var{archive}