[Ada] Craft .ctors/.dtors sections manually for VxWorks EH registration
Temporary change for experimental purposes. Further cleanups will be needed if this sheme works as we hope. 2018-05-30 Olivier Hainque <hainque@adacore.com> gcc/ada/ * vx_crtbegin_attr.c (CTOR_ATTRIBUTE, DTOR_ATTRIBUTE): Empty. (eh_registration_ctors, eh_registration_tors): New static variables, forced in a .ctors/.dtors section, respectively, with priority. From-SVN: r260938
This commit is contained in:
parent
812e6118dc
commit
5e648d3021
@ -1,3 +1,9 @@
|
||||
2018-05-30 Olivier Hainque <hainque@adacore.com>
|
||||
|
||||
* vx_crtbegin_attr.c (CTOR_ATTRIBUTE, DTOR_ATTRIBUTE): Empty.
|
||||
(eh_registration_ctors, eh_registration_tors): New static variables,
|
||||
forced in a .ctors/.dtors section, respectively, with priority.
|
||||
|
||||
2018-05-30 Bob Duff <duff@adacore.com>
|
||||
|
||||
* aspects.ads, contracts.adb, exp_util.adb, expander.adb, expander.ads,
|
||||
|
@ -31,12 +31,19 @@
|
||||
|
||||
/* crtbegin kind of file for ehframe registration/deregistration
|
||||
purposes on VxWorks. This variant exposes the ctor/dtor functions
|
||||
as explicit constructors, expected to be placed in a .ctors/.dtors
|
||||
section. */
|
||||
as explicit constructors referenced from a .ctors/.dtors section. */
|
||||
|
||||
#define CTOR_ATTRIBUTE
|
||||
#define DTOR_ATTRIBUTE
|
||||
|
||||
#include "vx_crtbegin.inc"
|
||||
|
||||
/* 101 is the highest user level priority allowed by VxWorks. */
|
||||
|
||||
#define CTOR_ATTRIBUTE __attribute__((constructor(101)))
|
||||
#define DTOR_ATTRIBUTE __attribute__((destructor(101)))
|
||||
static void (* volatile eh_registration_ctors[])()
|
||||
__attribute__((section (".ctors.65424")))
|
||||
= { &CTOR_NAME };
|
||||
|
||||
#include "vx_crtbegin.inc"
|
||||
static void (* volatile eh_registration_dtors[])()
|
||||
__attribute__((section (".dtors.65424")))
|
||||
= { &DTOR_NAME };
|
||||
|
Loading…
Reference in New Issue
Block a user