File tree Expand file tree Collapse file tree 3 files changed +20
-9
lines changed Expand file tree Collapse file tree 3 files changed +20
-9
lines changed Original file line number Diff line number Diff line change @@ -19,14 +19,18 @@ SECTIONS
1919 {
2020 ALIGNED_SYMBOL(4, _rtc_fast_start)
2121
22+ HIDDEN(_rtc_code_start = .);
23+
2224 mapping[rtc_text]
2325
2426 *rtc_wake_stub*.*(.text .text.*)
2527 *(.rtc_text_end_test)
2628
27- /* Padding for possible CPU prefetch + alignment for PMS split lines */
28- . += _esp_memprot_prefetch_pad_size;
29- . = ALIGN(_esp_memprot_align_size);
29+ HIDDEN(_rtc_code_end = .);
30+
31+ /* Padding for possible CPU prefetch + 4B alignment for PMS split lines. */
32+ . = ((_rtc_code_end - _rtc_code_start) == 0) ?
33+ ALIGN(0) : _esp_memprot_prefetch_pad_size + ALIGN(4);
3034
3135 _rtc_text_end = ABSOLUTE(.);
3236 } > rtc_iram_seg
Original file line number Diff line number Diff line change @@ -26,13 +26,16 @@ SECTIONS
2626 {
2727 ALIGNED_SYMBOL(4, _rtc_text_start)
2828
29+ HIDDEN(_rtc_code_start = .);
30+
2931 mapping[rtc_text]
3032
3133 *rtc_wake_stub*.*(.literal .text .literal.* .text.*)
3234
33- /* Padding for possible CPU prefetch + alignment for PMS split lines */
34- . += _esp_memprot_prefetch_pad_size;
35- . = ALIGN(_esp_memprot_align_size);
35+ HIDDEN(_rtc_code_end = .);
36+
37+ /* Possibly align + 16B for CPU dummy speculative instruction fetch. */
38+ . = ((_rtc_code_end - _rtc_code_start) == 0) ? ALIGN(0) : ALIGN(4) + 16;
3639
3740 _rtc_text_end = ABSOLUTE(.);
3841 } > rtc_iram_seg
Original file line number Diff line number Diff line change @@ -20,16 +20,20 @@ SECTIONS
2020 ALIGNED_SYMBOL(4, _rtc_fast_start)
2121 ALIGNED_SYMBOL(4, _rtc_text_start)
2222
23+ HIDDEN(_rtc_code_start = .);
24+
2325 *(.rtc.entry.literal .rtc.entry.text)
2426
2527 mapping[rtc_text]
2628
2729 *rtc_wake_stub*.*(.literal .text .literal.* .text.*)
2830 *(.rtc_text_end_test)
2931
30- /* Padding for possible CPU prefetch + alignment for PMS split lines */
31- . += _esp_memprot_prefetch_pad_size;
32- . = ALIGN(_esp_memprot_align_size);
32+ HIDDEN(_rtc_code_end = .);
33+
34+ /* Padding for possible CPU prefetch + 4B alignment for PMS split lines. */
35+ . = ((_rtc_code_end - _rtc_code_start) == 0) ?
36+ ALIGN(0) : _esp_memprot_prefetch_pad_size + ALIGN(4);
3337
3438 _rtc_text_end = ABSOLUTE(.);
3539 } > rtc_iram_seg
You can’t perform that action at this time.
0 commit comments