NXFLAT doesn't set bit 0 in the entry point address

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1958 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2009-06-26 01:18:24 +00:00
parent a1ef2c1ed5
commit 8e549fb571

View File

@ -110,6 +110,16 @@ void up_initial_state(_TCB *tcb)
xcp->regs[REG_PIC] = (uint32)tcb->dspace->region;
}
/* Make certain that bit 0 is set in the main entry address. This
* is only an issue when NXFLAT is enabled. NXFLAT doesn't know
* anything about thumb; the addresses that NXFLAT sets are based
* on file header info and won't have bit 0 set.
*/
#ifdef CONFIG_NXFLAT
tcb->entry.main = (main_t)((uint32)tcb->entry.main | 1);
#endif
#endif
/* Enable or disable interrupts, based on user configuration */