source: soft/tp8/correction/ldscript @ 24

Last change on this file since 24 was 7, checked in by alain, 14 years ago

fichiers tp12

File size: 2.2 KB
Line 
1/**********************************************************
2    File : ldscript
3    Author : Alain Greiner
4    Date : October 2009
5**********************************************************/
6
7/* definition of the base address for all segments
8The peripherals base addresses are referenced by the
9software drivers and must be defined, even if the
10peripherals are not present in the architecture */
11
12seg_reset_base  = 0xBFC00000;
13seg_kcode_base  = 0x80000000;
14seg_kdata_base  = 0x81000000;
15seg_kunc_base   = 0x82000000;
16seg_code_base   = 0x00400000;
17seg_data_base   = 0x10000000;
18seg_stack_base  = 0x20000000;
19
20seg_tty_base    = 0x90000000;    /* controleur TTY */
21seg_timer_base  = 0x91000000;    /* controleur TIMER */
22seg_ioc_base    = 0x92000000;    /* controleur I/O */
23seg_dma_base    = 0x93000000;    /* controleur DMA */
24seg_locks_base  = 0x94000000;    /* controleur LOCKS */
25seg_gcd_base    = 0x95000000;    /* controleur GCD */
26seg_fb_base     = 0x96000000;    /* controleur FRAME BUFFER */
27seg_icu_base    = 0x9F000000;    /* controleur ICU */
28
29/* definition of various hardware parameters.
30These variables are referenced in the drivers.c file,
31and must be defined, even if the corresponding
32peripherals are not present in the architecture */
33
34NB_TTYS     = 1;
35NB_LOCKS    = 0;
36NB_TIMERS   = 0;
37NB_PROCS    = 1;
38
39/* Maximum number of tasks per processoir
40It is referenced in the drivers.c file to compute
41the global TTY index = proc_id*NB_TASKS + task_id */
42
43NB_TASKS    = 1;
44
45/* Grouping sections into segments */
46
47SECTIONS
48{
49    . = seg_kcode_base;
50    seg_kernel : {
51        *(.giet)
52        *(.switch)
53        *(.drivers)
54        *(.isr)
55    }
56    . = seg_kdata_base;
57    seg_kdata : {
58        *(.kdata)
59    }
60    . = seg_kunc_base;
61    seg_kunc : {
62        *(.unckdata)
63    }
64    . = seg_kdata_base;
65    seg_kdata : {
66        *(.ksave)
67    }
68    . = seg_code_base;
69    seg_code : {
70        *(.text)
71    }
72    . = seg_reset_base;
73    seg_reset : {
74        *(.reset)
75    }
76    . = seg_data_base;
77    seg_data : {
78        *(.rodata)
79        . = ALIGN(4);
80        *(.rodata.*)
81        . = ALIGN(4);
82        *(.data)
83        . = ALIGN(4);
84        *(.sdata)
85        . = ALIGN(4);
86        *(.bss)
87        *(COMMON)
88        *(.sbss)
89    }
90}
91
Note: See TracBrowser for help on using the repository browser.