split kernel lib sources into their own directory and handled the section

differences with a partial link and a special link script
This commit is contained in:
Eric J. Bowersox
2013-05-02 22:31:00 -06:00
parent 9c655d1fb0
commit 622b4cfe3c
18 changed files with 272 additions and 71 deletions

View File

@@ -49,8 +49,6 @@
#define SEG_INIT_DATA __attribute__((__section__(".prestart.data")))
#define SEG_INIT_RODATA __attribute__((__section__(".prestart.rodata")))
#define SEG_RODATA SEG_INIT_RODATA
#define SEG_LIB_CODE SEG_INIT_CODE
#define SEG_LIB_RODATA SEG_INIT_RODATA
#else
@@ -58,8 +56,6 @@
#define SEG_INIT_DATA __attribute__((__section__(".init.data")))
#define SEG_INIT_RODATA __attribute__((__section__(".init.rodata")))
#define SEG_RODATA __attribute__((__section__(".rodata")))
#define SEG_LIB_CODE __attribute__((__section__(".lib.text")))
#define SEG_LIB_RODATA __attribute__((__section__(".lib.rodata")))
#endif /* __COMROGUE_PRESTART__ */
@@ -70,7 +66,6 @@
#define DECLARE_STRING8_CONST_STGCLASS(name, value, stgclass) const CHAR stgclass name [] = value
#define DECLARE_INIT_STRING8_CONST(name, value) DECLARE_STRING8_CONST_STGCLASS(name, value, SEG_INIT_RODATA)
#define DECLARE_LIB_STRING8_CONST(name, value) DECLARE_STRING8_CONST_STGCLASS(name, value, SEG_LIB_RODATA)
#define DECLARE_STRING8_CONST(name, value) DECLARE_STRING8_CONST_STGCLASS(name, value, SEG_RODATA)
#endif /* __ASM__ */

View File

@@ -90,12 +90,8 @@ CDECL_END
#if defined(__COMROGUE_PRESTART__) || defined(__COMROGUE_INIT__)
#define DECLARE_THIS_FILE static DECLARE_INIT_STRING8_CONST(THIS_FILE, __FILE__);
#else
#if defined(__COMROGUE_KERNEL_LIB__)
#define DECLARE_THIS_FILE static DECLARE_LIB_STRING8_CONST(THIS_FILE, __FILE__);
#else
#define DECLARE_THIS_FILE static DECLARE_STRING8_CONST(THIS_FILE, __FILE__);
#endif
#endif
#define ASSERT(x) ((x) ? (void)0 : ASSERT_FAIL_FUNC(THIS_FILE, __LINE__))
#define VERIFY(x) ASSERT(x)