|
@@ -1,6 +1,8 @@
|
1
|
1
|
#ifndef INIT_H
|
2
|
2
|
#define INIT_H
|
3
|
3
|
|
|
4
|
+#include "tables.h"
|
|
5
|
+
|
4
|
6
|
/*
|
5
|
7
|
* In order to avoid having objects dragged in just because main()
|
6
|
8
|
* calls their initialisation function, we allow each object to
|
|
@@ -33,20 +35,20 @@ struct init_fn {
|
33
|
35
|
};
|
34
|
36
|
|
35
|
37
|
/* Use double digits to avoid problems with "10" < "9" on alphabetic sort */
|
36
|
|
-#define INIT_LIBRM "00"
|
37
|
|
-#define INIT_CONSOLE "01"
|
38
|
|
-#define INIT_CPU "02"
|
39
|
|
-#define INIT_TIMERS "03"
|
40
|
|
-#define INIT_PCIBIOS "04"
|
41
|
|
-#define INIT_MEMSIZES "05"
|
42
|
|
-#define INIT_RELOCATE "06"
|
43
|
|
-#define INIT_PCMCIA "07"
|
44
|
|
-#define INIT_HEAP "08"
|
|
38
|
+#define INIT_LIBRM 01
|
|
39
|
+#define INIT_CONSOLE 02
|
|
40
|
+#define INIT_CPU 03
|
|
41
|
+#define INIT_TIMERS 04
|
|
42
|
+#define INIT_PCIBIOS 05
|
|
43
|
+#define INIT_MEMSIZES 06
|
|
44
|
+#define INIT_RELOCATE 07
|
|
45
|
+#define INIT_PCMCIA 08
|
|
46
|
+#define INIT_HEAP 09
|
45
|
47
|
|
46
|
48
|
/* Macro for creating an initialisation function table entry */
|
47
|
49
|
#define INIT_FN( init_order, init_func, reset_func, exit_func ) \
|
48
|
50
|
static struct init_fn init_functions \
|
49
|
|
- __attribute__ ((used,__section__(".init_fns." init_order))) = { \
|
|
51
|
+ __attribute__ (( used, __table_section(init_fn,init_order) )) = { \
|
50
|
52
|
.init = init_func, \
|
51
|
53
|
.reset = reset_func, \
|
52
|
54
|
.exit = exit_func, \
|