Cpp in kernelspace
Martin Hansen
mah_list1 at cfsi.dk
Wed Jun 1 17:43:24 CEST 2005
On Sat, 2005-05-28 at 00:17 +0200, Loic CUVILLON wrote:
> Use of GCC 3(.3.X) and GCC 3 conception may be the issue. I will try to
> see its documentation and to read again old posts.
To clarify the question a snippet from the source, that shows that
__do_global_dtors is only implementet when compilining with gcc <=2, and
decared extern when compilling with gcc >= 3:
#if (__GNUC__ <= 2)
#ifndef CTORS_SECTION_ASM_OP
#define CTORS_SECTION_ASM_OP ".section\t.ctors,\"aw\""
#endif
#ifndef DTORS_SECTION_ASM_OP
#define DTORS_SECTION_ASM_OP ".section\t.dtors,\"aw\""
#endif
#else /* ! (__GNUC__ > 3) */
extern void __do_global_ctors_aux(void);
#define __do_global_ctors __do_global_ctors_aux
extern void __do_global_dtors_aux(void);
#define __do_global_dtors __do_global_dtors_aux
#endif /* __GNUC__ > 3 */
...
...
#if (__GNUC__ <= 2)
extern int atexit( func_ptr function );
static func_ptr __DTOR_LIST__[];
static void
__do_global_dtors(void)
{
static func_ptr *p = __DTOR_LIST__ + 1;
...
...
}
extern func_ptr __CTOR_LIST__[];
static void
__do_global_ctors(void)
{
...
...
}
#endif /* ! (__GNUC__ > 3) */
--
Med venlig hilsen/mojn/regards
Martin Hansen
Center for Software Innovation
Stenager 2, DK-6400 Sønderborg, Web: www.cfsi.dk
More information about the Rtai
mailing list