Commit 9833e980 authored by Tristan Gingold's avatar Tristan Gingold

switch: adjust build_id and stats sections

parent 093b49fd
...@@ -122,9 +122,12 @@ _true_reset: ...@@ -122,9 +122,12 @@ _true_reset:
.org PPG_STATIC_PADDR .org PPG_STATIC_PADDR
.word ppg_static .word ppg_static
#endif #endif
#ifdef CONFIG_TARGET_WR_SWITCH
.org STATS_PADDR .org STATS_PADDR
.word stats .word stats
#endif
.org UPTIME_SEC_ADDR .org UPTIME_SEC_ADDR
.global uptime_sec .global uptime_sec
uptime_sec: uptime_sec:
......
...@@ -70,6 +70,7 @@ SECTIONS ...@@ -70,6 +70,7 @@ SECTIONS
*/ */
.stats : { .stats : {
*(.stats) *(.stats)
*(.build_id)
} > stats } > stats
/* /*
......
...@@ -15,19 +15,19 @@ ...@@ -15,19 +15,19 @@
* Thus, we place this structure at a known address in the linker script * Thus, we place this structure at a known address in the linker script
*/ */
#ifdef CONFIG_TARGET_WR_SWITCH #ifdef CONFIG_TARGET_WR_SWITCH
#define STATS_SECTION __attribute__((section(".stats"))) #define STATS_SECTION(NAME) __attribute__((section(NAME)))
#else #else
#define STATS_SECTION #define STATS_SECTION(NAME)
#endif #endif
#ifdef CONFIG_TARGET_WR_SWITCH #ifdef CONFIG_TARGET_WR_SWITCH
struct spll_stats stats STATS_SECTION = { struct spll_stats stats STATS_SECTION(".stats") = {
.magic = 0x5b1157a7, .magic = 0x5b1157a7,
.ver = SPLL_STATS_VER .ver = SPLL_STATS_VER
}; };
#endif #endif
const struct spll_build_id build_id STATS_SECTION = { const struct spll_build_id build_id STATS_SECTION(".build_id") = {
#ifdef CONFIG_DETERMINISTIC_BINARY #ifdef CONFIG_DETERMINISTIC_BINARY
.build_date = "", .build_date = "",
.build_time = "", .build_time = "",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment