Xtensa gcc is configured to emit a .ctors section, RISC-V gcc is configured with --enable-initfini-array so it emits an .init_array section instead. But the init_priority sections will be sorted for iteration in ascending order during startup. The rest of the init_array sections is sorted for iteration in descending order during startup, however. Hence a different section is generated for the init_priority functions which is looped over in ascending direction instead of descending direction. The RISC-V-specific behavior is dependent on the linker script ld/esp32c3/sections.ld.in.