summaryrefslogtreecommitdiff
path: root/gcc/doc/extend.texi
diff options
context:
space:
mode:
authornickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-12 08:45:00 +0000
committernickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-12 08:45:00 +0000
commitdb281f5af7b3ebb3d943c5d0a2de0923d94c7e23 (patch)
tree35b091528607aff8382046cbeb9d46bb0dde23d4 /gcc/doc/extend.texi
parent86752479f629532c8166eb1015e1d09a3ff4f72f (diff)
downloadgcc-db281f5af7b3ebb3d943c5d0a2de0923d94c7e23.tar.gz
* config.gcc: Add sh-*-symbianelf target.
* config/sh/sh.c: Add new target macros: TARGET_ENCODE_SECTION_INFO, TARGET_STRIP_NAME_ENCODING, TARGET_CXX_IMPORT_EXPORT_CLASS. (sh_file_start): Create a definition of the .directive section. (sh_attribute): Add dllimport and dllexport attributes. * config/sh/symbian-pre.h: New file. * config/sh/symbian-post.h: New file. * config/sh/symbian.c: New file. Contains Symbian specific functions. * config/sh/sh-protos.h: Add prototypes for new functions provided by symbian.c. * config/sh/t-symbian: New file. * doc/extend.texi: Document support for dllimport and dllexport attributes by the sh-symbianelf target. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84551 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc/extend.texi')
-rw-r--r--gcc/doc/extend.texi60
1 files changed, 37 insertions, 23 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 4f9b9d922be..1df022107be 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -2009,10 +2009,11 @@ types (@pxref{Variable Attributes}, @pxref{Type Attributes}.)
@item dllexport
@cindex @code{__declspec(dllexport)}
-On Microsoft Windows targets the @code{dllexport} attribute causes the
-compiler to provide a global pointer to a pointer in a dll, so that it
-can be referenced with the @code{dllimport} attribute. The pointer name
-is formed by combining @code{_imp__} and the function or variable name.
+On Microsoft Windows targets and Symbian targets the @code{dllexport}
+attribute causes the compiler to provide a global pointer to a pointer
+in a dll, so that it can be referenced with the @code{dllimport}
+attribute. The pointer name is formed by combining @code{_imp__} and
+the function or variable name.
Currently, the @code{dllexport}attribute is ignored for inlined
functions, but export can be forced by using the
@@ -2024,21 +2025,24 @@ member functions and static data members as exports. Static consts
initialized in-class are not marked unless they are also defined
out-of-class.
-On cygwin, mingw and arm-pe targets, @code{__declspec(dllexport)} is
-recognized as a synonym for @code{__attribute__ ((dllexport))} for
-compatibility with other Microsoft Windows compilers.
+On cygwin, mingw, arm-pe and sh-symbianelf targets,
+@code{__declspec(dllexport)} is recognized as a synonym for
+@code{__attribute__ ((dllexport))} for compatibility with other
+Microsoft Windows and Symbian compilers.
-Alternative methods for including the symbol in the dll's export table
-are to use a .def file with an @code{EXPORTS} section or, with GNU ld,
-using the @option{--export-all} linker flag.
+For Microsoft Windows targets there are alternative methods for
+including the symbol in the dll's export table such as using a
+@file{.def} file with an @code{EXPORTS} section or, with GNU ld, using
+the @option{--export-all} linker flag.
@item dllimport
@cindex @code{__declspec(dllimport)}
-On Microsoft Windows targets, the @code{dllimport} attribute causes the
-compiler to reference a function or variable via a global pointer to a
-pointer that is set up by the Microsoft Windows dll library. The pointer
-name is formed by combining @code{_imp__} and the function or variable
-name. The attribute implies @code{extern} storage.
+On Microsoft Windows and Symbian targets, the @code{dllimport}
+attribute causes the compiler to reference a function or variable via
+a global pointer to a pointer that is set up by the Microsoft Windows
+dll library. The pointer name is formed by combining @code{_imp__} and
+the function or variable name. The attribute implies @code{extern}
+storage.
Currently, the attribute is ignored for inlined functions. If the
attribute is applied to a symbol @emph{definition}, an error is reported.
@@ -2052,15 +2056,25 @@ member functions and static data members as imports. However, the
attribute is ignored for virtual methods to allow creation of vtables
using thunks.
-On cygwin, mingw and arm-pe targets, @code{__declspec(dllimport)} is
-recognized as a synonym for @code{__attribute__ ((dllimport))} for
-compatibility with other Microsoft Windows compilers.
+For Symbian targets the @code{dllimport} attribute also has another
+affect - it can cause the vtable and run-time type information for a
+class to be exported. This happens when the class has a dllimport'ed
+constructor or a non-inline, non-pure virtual function and, for either
+of those two conditions, the class also has a inline constructor or
+destructor and has a key function that is defined in the current
+translation unit.
-The use of the @code{dllimport} attribute on functions is not necessary,
-but provides a small performance benefit by eliminating a thunk in the
-dll. The use of the @code{dllimport} attribute on imported variables was
-required on older versions of GNU ld, but can now be avoided by passing
-the @option{--enable-auto-import} switch to ld. As with functions, using
+On cygwin, mingw, arm-pe sh-symbianelf targets,
+@code{__declspec(dllimport)} is recognized as a synonym for
+@code{__attribute__ ((dllimport))} for compatibility with other
+Microsoft Windows and Symbian compilers.
+
+For Microsoft Windows based targets the use of the @code{dllimport}
+attribute on functions is not necessary, but provides a small
+performance benefit by eliminating a thunk in the dll. The use of the
+@code{dllimport} attribute on imported variables was required on older
+versions of GNU ld, but can now be avoided by passing the
+@option{--enable-auto-import} switch to ld. As with functions, using
the attribute for a variable eliminates a thunk in the dll.
One drawback to using this attribute is that a pointer to a function or