[rtdef] use lower-case to define attributes (#6728)

* [rtdef] rename RT_WEAK attribute as rt_weak

* [rtdef] rename RT_USED attribute as rt_used

* [rtdef] rename RT_SECTION attribute as rt_section

* [rtdef] rename ALIGN attribute as rt_align

* [legacy] add RT_USED ALIGN RT_SECTION RT_WEAK as legacy support
This commit is contained in:
Man, Jianting (Meco)
2022-12-11 13:12:03 -05:00
committed by GitHub
parent a4b8762d85
commit 99bdf978d7
178 changed files with 472 additions and 462 deletions

View File

@@ -21,22 +21,22 @@ static rt_size_t ve_exporter_num = 0;
/* for ARM C and IAR Compiler */
#if defined(__ARMCC_VERSION) || defined (__ICCARM__) || defined(__ICCRX__)
static RT_USED const struct ve_exporter __ve_table_start
RT_SECTION("0.""VarExpTab") = {"ve_start", "ve_start", 0};
static rt_used const struct ve_exporter __ve_table_start
rt_section("0.""VarExpTab") = {"ve_start", "ve_start", 0};
static RT_USED const struct ve_exporter __ve_table_end
RT_SECTION("2.""VarExpTab") = {"ve_end", "ve_end", 2};
static rt_used const struct ve_exporter __ve_table_end
rt_section("2.""VarExpTab") = {"ve_end", "ve_end", 2};
#endif
/* for MS VC++ compiler */
#if defined(_MSC_VER)
#pragma section("VarExpTab$a", read)
__declspec(allocate("VarExpTab$a"))
RT_USED const struct ve_exporter __ve_table_start = { "ve_start", "ve_start", 0};
rt_used const struct ve_exporter __ve_table_start = { "ve_start", "ve_start", 0};
#pragma section("VarExpTab$z", read)
__declspec(allocate("VarExpTab$z"))
RT_USED const struct ve_exporter __ve_table_end = { "ve_end", "ve_end", 2};
rt_used const struct ve_exporter __ve_table_end = { "ve_end", "ve_end", 2};
/* Find var objects in VarExpTab segments */
static int ve_init_find_obj(unsigned int *begin, unsigned int *end, ve_exporter_t *table)