-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Split data, bss, noinit sections into application and kernel areas #3622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
by Andrew Boie: This should not be too bad. In the linker script you can do section routing on source file basis. Example:
Currently, the main linker script takes in the following files:
This will need to be rearranged a little bit.
Will need to decide on a case-by-case basis what under ext/ and lib/ should go in user/kernel space. At the moment, we are not trying to split out program text or rodata, program text and rodata will remain a unified blob. We may reconsider this later. |
by Andrew Boie: Hi All, Here is a work-in-progress patch series to split out kernel/application data. https://github.com/andrewboie/zephyr/tree/linkage-wip Example objdump output:
Regards, |
by Adithya Baglody: Andrew quick question- {code:c} |
by Andrew Boie: Adithya Baglody I don't want to have to go through the entire kernel tree and manually set the section on every single global. |
by Andrew Boie: |
Blocks GH-3630 |
Reported by Andrew Boie:
We need to split global data areas into application and kernel areas. If memory protection is enabled, all toplevel data, noinit, and bss declarations that are not part of the application should be in a memory region that is completely inaccessible to non-supervisor threads. Devise a way to do this in the linker scripts.
(Imported from Jira ZEP-2184)
The text was updated successfully, but these errors were encountered: