Hi @Harry_Zhang
The EXEC_P flag indicates that the section is executable
EXEC_P is a flag that is part of the e_type field of the Elf32_Ehdr structure (the “real” name is ET_EXEC). So you're wrong to say it's a section-related flag!
The same thing applies to NONE

Aligning sections to 1 may be necessary for certain memory configurations where strict alignment isn’t required or could cause issues (like running on different cores with different memory constraints).
As I have said this before, this behavior harms us.
I wrote a post here.
Removed Unwind Sections:
• Why to do it?: Unwind sections are used for stack unwinding during exceptions. If this is not needed (e.g., the target core doesn’t use exceptions), these sections can be removed to save space.
• How to do this?: You can strip specific sections using objcopy:
objcopy --remove-section=<section_name> <input_file> <output_file>

Are you sure about this? The section listed is .core_m4slave.ARM.exidx, which I understand is still in the file processed by mcux_fixelf.
The source code for mcux-fixelf is typically not provided by NXP. However, I need to confirm internally whether the code can be provided.
This is really bad news for us. It's also unwarranted, by the way, because given what you're telling me, there shouldn't be any secrets to protect.
To replicate the functionality of mcux-fixelf, you would need a deep understanding of ELF headers and potentially create custom scripts using objdump, objcopy, readelf, and manual hex editing. Specific commands and operations would depend on exactly what mcux-fixelf modifies, as outlined above.
It's quite interesting—you mention that I should be thoroughly familiar with the ELF format to accomplish certain tasks. Ironically, it seems like you might be the one who could use a deeper understanding of it. But perhaps I'm mistaken; surely, anyone contributing to this forum couldn't possibly lack such knowledge, right? Maybe you just had a brief moment of distraction or a slip of the mind.
After all, we all have those days when the basics momentarily escape us!
regards
Max