diff options
| author | Bernard Xiong <[email protected]> | 2018-08-31 18:41:44 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2018-08-31 18:41:44 +0800 |
| commit | 07ec7e686d7e17886420d3085bf561e5185e6a6d (patch) | |
| tree | 966146eb3a3585b10df5cbae00d9e9fe824d2488 /include/rtdef.h | |
| parent | d74d5801c8c08d57aa30732f6e52c082b3d215c5 (diff) | |
| parent | 7c0c1c1b4ab91fae6ee4b138dface0e76e92bd95 (diff) | |
Merge pull request #1754 from liangyongxiang/rt-used
add RT_USED to component init and finsh shell
Diffstat (limited to 'include/rtdef.h')
| -rw-r--r-- | include/rtdef.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/rtdef.h b/include/rtdef.h index d18ced3a6f..c37f90be2d 100644 --- a/include/rtdef.h +++ b/include/rtdef.h @@ -189,13 +189,13 @@ typedef int (*init_fn_t)(void); const char* fn_name; const init_fn_t fn; }; - #define INIT_EXPORT(fn, level) \ - const char __rti_##fn##_name[] = #fn; \ - const struct rt_init_desc __rt_init_desc_##fn SECTION(".rti_fn."level) = \ + #define INIT_EXPORT(fn, level) \ + const char __rti_##fn##_name[] = #fn; \ + RT_USED const struct rt_init_desc __rt_init_desc_##fn SECTION(".rti_fn."level) = \ { __rti_##fn##_name, fn}; #else - #define INIT_EXPORT(fn, level) \ - const init_fn_t __rt_init_##fn SECTION(".rti_fn."level) = fn + #define INIT_EXPORT(fn, level) \ + RT_USED const init_fn_t __rt_init_##fn SECTION(".rti_fn."level) = fn #endif #endif #else |
