how to process object file before create static library

To build a static library:
Common process: add_library(name source-list ) #xx.c-> xx.o, xx.o->xx.a
My problem: I need run command "${CMAKE_OBJCOPY} --prefix-alloc-sections .sram xx.o " to process xx.o file
The process : C files list → object files list , object files list->object files list( loop run : ${CMAKE_OBJCOPY} --prefix-alloc-sections .sram xx.o) object files list → static library

how to write my CMakeLists.txt to build static library

CMake doesn’t really provide a way to intercept the object files between the compiler and the linker. Someone else here may have tried it and figured something out (the problem sounds vaguely familiar), but I can’t recall details; I’d recommend searching Discourse here.

Thank you very much!