Page MenuHomePhabricator

Need a way to better origanize constant sections
Closed, WontfixPublic

Description

TF-M needs fine grained control ever what section is placed to which memory location. How we can handle the issue depends on the compiler tool chain used, and thus it is complicated to come up with a portable solution. Still for most tool chains better organization of code could help. For example in GCC (ld) specific linker files pattern matching is used to find the right section of the right set of files to allow mapping them to right output locations. A predefined file naming convention could make the liner script more simple and more flexible.

I think we shall investigate what options we have to make this better, and as a minimum write documentation ("design patters") how the issue shall be handled for a specific tool set. Unfortunately only the pre-processor and the C compiler is standardized and all other tools participating in building the binaries are non-standard. To avoid chaos in the long term, we need to "standardize" how we use these tools. This is especially important for TF-M as the correct memory layout is a significant part of the security model.

Another angle which makes this work important is the fact that the TF-M team has no direct control on the final solution used by the project where TF-M will be used. So having a well described set of patterns on which TF-M users can build their solution on is important.

Event Timeline

wmnt closed this task as Wontfix.May 7 2020, 1:43 PM

Marking the issue as closed taking into account the inactivity on this thread.
I suggest opening a new issue/issues - with finer incremental aims if possible - based on the present status of the project if needed.