Hello, I apologize for the late response, I was researching more information, so I think that the object for M4 cannot be linked to an M7 project. In other words, you must compile and link your M4 project alone.
And then put it into the M7 project, but not as a library, it is more like a const-data, just like what the SDK's multi-core example does. Then in your application, you need to wake up the M4 core and tell it where the firmware is (The firmware must be an executable image, including the vector-table at header, otherwise, M4 will not boot correctly.) by setting some registers. Then your firmware can run at the same time as the M7's.
So, I did the test that works well but I´m asking for more details, based on this app note i.MX RT1170 Dual Core Application (nxp.com).
When you have your project compiled take the axf.o from the Debug folder, then add a folder the root depends on you, but need to change the path on the MCU Linker > Multicore > M4SLAVE.
Let me know if you have more doubts.
Best regards,
Pavel