How can I place code generated via add_library(mylib..) to a specific location in flash?

I have an application that I have started using the NUS template which will run in the nrf52840 devkit.

I also have some 'legacy' c files in a library folder that are included in the build using add_library() cmake statement.
For the same of this question let us assume that the library contains one file called legacy.c and it has a single function called my_legacy_func().

When I build the application i do get an .elf file.
However looking at the .map file it is showing me that the function my_legacy_func() has been placed at address 0x00000100 and then when i call it from main() of the zephyr i end up in a memfault exception.

Can you suggest how I  can solve this problem?

Note: That same function my_legacy_func(), if I copy to my main.c then there is no memfault.
Also note that my actual library is about 500 .c files and need to be compiled with a special set of compiler defines hence the add_library option

I thank you in advance

Kind regards