From cd170c1b7c788a263de8f9b9ccb01ef4952968b3 Mon Sep 17 00:00:00 2001 From: Bahadir Balban Date: Sat, 9 Feb 2008 14:33:37 +0000 Subject: [PATCH] Changed unit macro to use section attribute directly.` --- include/l4/macros.h | 16 +--------------- src/api/kip.c | 2 +- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/include/l4/macros.h b/include/l4/macros.h index 4cdf050..e00475d 100644 --- a/include/l4/macros.h +++ b/include/l4/macros.h @@ -17,19 +17,6 @@ /* use this to place code/data in a certain section */ #define SECTION(x) __attribute__((section(x))) -#define UNIT(x) __attribute__((section(".data." x))) - -/* - * use WEAK to specifiy a weak function which can be replaced - * by a architecture specific optimization - * example: void WEAK bla() - */ -#define WEAK __attribute__(( weak )) - -/* - * Marks a function as noreturn. - */ -#define NORETURN __attribute__(( noreturn )) /* Functions for critical path optimizations */ #if (__GNUC__ >= 3) @@ -110,5 +97,4 @@ printk(msg); \ BUG(); \ } while(0) -#endif /* !__MACROS_H__ */ - +#endif /* __MACROS_H__ */ diff --git a/src/api/kip.c b/src/api/kip.c index 66c5848..199d9da 100644 --- a/src/api/kip.c +++ b/src/api/kip.c @@ -13,7 +13,7 @@ #include INC_ARCH(bootdesc.h) /* FIXME: Change the unit name */ -UNIT("kip") struct kip kip; +__attribute__ ((section(".data.kip"))) struct kip kip; /* Error-checked kernel data request call */ int __sys_kread(int rd, void *dest)