Skip to content

Commit

Permalink
Add preserved_text section
Browse files Browse the repository at this point in the history
  • Loading branch information
gridbugs committed Mar 20, 2017
1 parent 45e50bb commit cf42782
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions camkes/templates/component.template.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ static void /*? init ?*/(void) {
/*- endif -*/

/*- set p = Perspective(instance=me.name) -*/
void USED /*? p['tls_symbol'] ?*/(int thread_id) {
void USED SECTION("preserved_text") /*? p['tls_symbol'] ?*/(int thread_id) {
switch (thread_id) {
/*- set tcb_control = alloc('tcb_0_control', seL4_TCBObject) -*/
/*- if realtime -*/
Expand Down Expand Up @@ -431,7 +431,7 @@ void USED /*? p['tls_symbol'] ?*/(int thread_id) {
}

/*- set p = Perspective(instance=me.name) -*/
int USED /*? p['entry_symbol'] ?*/(int thread_id) {
int USED SECTION("preserved_text") /*? p['entry_symbol'] ?*/(int thread_id) {
#if defined(SEL4_DEBUG_KERNEL) && defined(CONFIG_CAMKES_PROVIDE_TCB_CAPS)
/*- set thread_name = c_symbol() -*/
char /*? thread_name ?*/[seL4_MsgMaxLength * sizeof(seL4_Word)];
Expand Down
1 change: 1 addition & 0 deletions camkes/templates/linker.lds
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ SECTIONS {

/* Code. */
.text : ALIGN(4096) {
KEEP(*(preserved_text));
*(.text*)
}

Expand Down

0 comments on commit cf42782

Please sign in to comment.