moved prestart sources to their own directory and set up the section names

they use with a custom linker script
This commit is contained in:
Eric J. Bowersox
2013-05-02 23:16:55 -06:00
parent eda9737083
commit 4cf088683f
9 changed files with 279 additions and 67 deletions

View File

@@ -43,22 +43,11 @@
*----------------------
*/
#ifdef __COMROGUE_PRESTART__
#define SEG_INIT_CODE __attribute__((__section__(".prestart.text")))
#define SEG_INIT_DATA __attribute__((__section__(".prestart.data")))
#define SEG_INIT_RODATA __attribute__((__section__(".prestart.rodata")))
#define SEG_RODATA SEG_INIT_RODATA
#else
#define SEG_INIT_CODE __attribute__((__section__(".init.text")))
#define SEG_INIT_DATA __attribute__((__section__(".init.data")))
#define SEG_INIT_RODATA __attribute__((__section__(".init.rodata")))
#define SEG_RODATA __attribute__((__section__(".rodata")))
#endif /* __COMROGUE_PRESTART__ */
/*------------------------------------
* String constant declaration macros
*------------------------------------

View File

@@ -87,7 +87,7 @@ CDECL_END
#define THIS_FILE __FILE__
#if defined(__COMROGUE_PRESTART__) || defined(__COMROGUE_INIT__)
#if defined(__COMROGUE_INIT__)
#define DECLARE_THIS_FILE static DECLARE_INIT_STRING8_CONST(THIS_FILE, __FILE__);
#else
#define DECLARE_THIS_FILE static DECLARE_STRING8_CONST(THIS_FILE, __FILE__);