diff options
author | Richard Earnshaw <rearnsha@arm.com> | 2001-12-13 14:24:03 +0000 |
---|---|---|
committer | Richard Earnshaw <rearnsha@gcc.gnu.org> | 2001-12-13 14:24:03 +0000 |
commit | 414e05cffba6eda254f91ea66e1edb04b55852a2 (patch) | |
tree | d02bbfaf0f7f2c12f79276ee2bd6883b939f8502 /gcc/doc | |
parent | 3a79cccbde4a5af128debfc5f281d7a96946e10e (diff) | |
download | gcc-414e05cffba6eda254f91ea66e1edb04b55852a2.zip gcc-414e05cffba6eda254f91ea66e1edb04b55852a2.tar.gz gcc-414e05cffba6eda254f91ea66e1edb04b55852a2.tar.bz2 |
* collect2.c (COLLECT_SHARED_INIT_FUNC)
(COLLECT_SHARD_FINI_FUNC): Define default values.
(write_c_file_stat): Use them to call construtor and destructor
functions in shared libraries.
* doc/tm.texi (COLLECT_SHARED_INIT_FUNC)
(COLLECT_SHARD_FINI_FUNC): Document them.
* config/netbsd.h (COLLECT_SHARED_INIT_FUNC)
(COLLECT_SHARD_FINI_FUNC): Define.
* config/netbsd.h (LINK_SPEC): Don't pull in estart if creating a
shared library. Pass -shared through to the linker.
* config/arm/netbsd.h (LINK_SPEC): Likewise.
* config/arm/t-netbsd (TARGET_LIBGCC2_CFLAGS): Add -fpic.
(SHLIB_EXT, SHLIB_NAME, SHLIB_SONAME, SHLIB_OBJS, SHLIB_LINK)
(SHLIB_INSTALL): Define.
From-SVN: r47975
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/tm.texi | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index 5e97e91..55d38ff 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -6638,6 +6638,24 @@ the following symbol is an initialization routine. If defined, a C string constant for a switch that tells the linker that the following symbol is a finalization routine. +@item COLLECT_SHARED_INIT_FUNC (@var{stream}, @var{func}) +If defined, a C statement that will write a function that can be +automatically called when a shared library is loaded. The function +should call @var{func}, which takes no arguments. If not defined, and +the object format requires an explicit initialization function, then a +function called @var{_GLOBAL__DI} will be generated. + +This function and the following one are used by collect2 when linking a +shared library that needs constructors or destructors, or has DWARF2 +exception tables embedded in the code. + +@item COLLECT_SHARED_FINI_FUNC (@var{stream}, @var{func}) +If defined, a C statement that will write a function that can be +automatically called when a shared library is unloaded. The function +should call @var{func}, which takes no arguments. If not defined, and +the object format requires an explicit finalization function, then a +function called @var{_GLOBAL__DD} will be generated. + @item INVOKE__main @findex INVOKE__main If defined, @code{main} will call @code{__main} despite the presence of |