diff options
Diffstat (limited to 'gcc/dbxout.c')
-rw-r--r-- | gcc/dbxout.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/gcc/dbxout.c b/gcc/dbxout.c index ed9015182ed..a6b7b99841f 100644 --- a/gcc/dbxout.c +++ b/gcc/dbxout.c @@ -3817,4 +3817,40 @@ dbxout_begin_function (tree decl) #endif /* DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO */ +/* Record an element in the table of global destructors. SYMBOL is + a SYMBOL_REF of the function to be called; PRIORITY is a number + between 0 and MAX_INIT_PRIORITY. */ + +void +default_stabs_asm_out_destructor (rtx symbol ATTRIBUTE_UNUSED, + int priority ATTRIBUTE_UNUSED) +{ +#if defined DBX_DEBUGGING_INFO || defined XCOFF_DEBUGGING_INFO + /* Tell GNU LD that this is part of the static destructor set. + This will work for any system that uses stabs, most usefully + aout systems. */ + dbxout_begin_simple_stabs ("___DTOR_LIST__", 22 /* N_SETT */); + dbxout_stab_value_label (XSTR (symbol, 0)); +#else + sorry ("global destructors not supported on this target"); +#endif +} + +/* Likewise for global constructors. */ + +void +default_stabs_asm_out_constructor (rtx symbol ATTRIBUTE_UNUSED, + int priority ATTRIBUTE_UNUSED) +{ +#if defined DBX_DEBUGGING_INFO || defined XCOFF_DEBUGGING_INFO + /* Tell GNU LD that this is part of the static destructor set. + This will work for any system that uses stabs, most usefully + aout systems. */ + dbxout_begin_simple_stabs ("___CTOR_LIST__", 22 /* N_SETT */); + dbxout_stab_value_label (XSTR (symbol, 0)); +#else + sorry ("global constructors not supported on this target"); +#endif +} + #include "gt-dbxout.h" |