mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
1. The .kasan.unused and .kasan.global sections contain compiler-generated data with the WRITE flag (.data..LASAN*), but the linker script placed them before .text without specifying a memory region. The linker could not put writable sections into the read-only ROM (rx) region, so it silently placed them at 0x40000000 in RAM, creating an extra LOAD segment that conflicts with QEMU virt's RAM layout and causes boot failure. 2. The .kasan.global should be placed before .data because .data patten (*(.data*)) includes .kasan.global pattern (*(.data..LASAN0)), and it cause kasan_global.py cannot find .kasan.global section to generate the g_global_region array. 3. Move .kasan.shadows from before .text to after .rodata. Placing it before .text causes .text to shift when .kasan.shadows transitions from empty (pass 1) to populated (pass 2+), preventing the multi-pass link addresses from converging. After .rodata it does not affect any upstream section addresses. 4. Add CMake post-build step to strip .kasan.unused and .kasan.global sections from the final binary, matching the Makefile build behavior. Signed-off-by: leisiji <2265215145@qq.com> |
||
|---|---|---|
| .. | ||
| menuconfig.cmake | ||
| nuttx_3rdparty.cmake | ||
| nuttx_add_application.cmake | ||
| nuttx_add_dependencies.cmake | ||
| nuttx_add_library.cmake | ||
| nuttx_add_module.cmake | ||
| nuttx_add_romfs.cmake | ||
| nuttx_add_subdirectory.cmake | ||
| nuttx_add_symtab.cmake | ||
| nuttx_create_symlink.cmake | ||
| nuttx_export_header.cmake | ||
| nuttx_extensions.cmake | ||
| nuttx_generate_headers.cmake | ||
| nuttx_generate_outputs.cmake | ||
| nuttx_generate_sim_ld.cmake | ||
| nuttx_kconfig.cmake | ||
| nuttx_mkconfig.cmake | ||
| nuttx_mkversion.cmake | ||
| nuttx_multiple_link.cmake | ||
| nuttx_overrides.cmake | ||
| nuttx_parse_function_args.cmake | ||
| nuttx_process_config.cmake | ||
| nuttx_redefine_symbols.cmake | ||
| nuttx_remove_compile_options.cmake | ||
| nuttx_sethost.cmake | ||
| nuttx_source_file_properties.cmake | ||
| nuttx_toolchain.cmake | ||
| savedefconfig.cmake | ||
| symtab.c.in | ||