From: Hyotaek Shim Date: Mon, 25 Feb 2019 02:38:51 +0000 (+0900) Subject: Apply the highest priority to constructors X-Git-Tag: accepted/tizen/unified/20190322.075526~48 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F17%2F200417%2F2;p=platform%2Fcore%2Fsystem%2Flibdbuspolicy.git Apply the highest priority to constructors __attribute__((constructor(101))) Change-Id: Ic08c64eb9bae900c6be90c21074e64804e2fabc7 Signed-off-by: Hyotaek Shim --- diff --git a/src/internal/global_nodestruct.hpp b/src/internal/global_nodestruct.hpp index 6bc7fe7..fc89577 100644 --- a/src/internal/global_nodestruct.hpp +++ b/src/internal/global_nodestruct.hpp @@ -28,7 +28,7 @@ namespace detail_NODESTRUCT_GLOBAL { alignas(TYPE) extern uint8_t NAME[sizeof(TYPE)]; }\ /* awkwardly written to silence gcc's -Wstrict-aliasing because _Pragma("GCC diagnostic ignored \"-Wstrict-aliasing\"") is bugged */\ static inline TYPE &NAME() { auto p = static_cast(&detail_NODESTRUCT_GLOBAL::NAME[0]); return *reinterpret_cast(p); }\ - namespace detailInit_NODESTRUCT_GLOBAL { __attribute__((constructor)) static void NAME() { new(&::NAME()) TYPE(); } } + namespace detailInit_NODESTRUCT_GLOBAL { __attribute__((constructor(101))) static void NAME() { new(&::NAME()) TYPE(); } } /** Define a global variable that is constructed (via gcc's __attribute__((constructor))) but never destroyed. */ #define DEF_NODESTRUCT_GLOBAL(TYPE,NAME)\