esp-idf/components/esp32/ld
Ivan Grokhotkov af7b21851e freertos: fix TLS run-time address calculation
Since dd849ffc, _rodata_start label has been moved to a different
linker output section from where the TLS templates (.tdata, .tbss)
are located. Since link-time addresses of thread-local variables are
calculated relative to the section start address, this resulted in
incorrect calculation of THREADPTR/$tp registers.

Fix by introducing new linker label, _flash_rodata_start, which points
to the .flash.rodata output section where TLS variables are located,
and use it when calculating THREADPTR/$tp.

Also remove the hardcoded rodata section alignment for Xtensa targets.
Alignment of rodata can be affected by the user application, which is
the issue dd849ffc was fixing. To accommodate any possible alignment,
save it in a linker label (_flash_rodata_align) and then use when
calculating THREADPTR. Note that this is not required on RISC-V, since
this target doesn't use TPOFF.
2021-05-10 11:18:09 +08:00
..
esp32_fragments.lf esp_wifi: ESP32 phy add [sections:phy_iram] 2021-03-19 03:02:26 +00:00
esp32.extram.bss.ld linker external bss: Align end of ext bss to word boundary 2018-12-20 01:40:05 +00:00
esp32.ld build: (Custom) App version info is now on a dedicated section, independent of the rodata alignment 2021-05-10 11:17:58 +08:00
esp32.peripherals.ld TWAI: Add ESP32-S2 support 2020-07-30 22:09:39 +08:00
esp32.project.ld.in freertos: fix TLS run-time address calculation 2021-05-10 11:18:09 +08:00