OpenCores
URL https://opencores.org/ocsvn/ion/ion/trunk

Subversion Repositories ion

[/] [ion/] [trunk/] [src/] [ion_noxram.lds] - Blame information for rev 2

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 ja_rd
/**
2
* ion_noxram.lds -- Linker script file for ION project (with no RAM or cache)
3
*
4
* The ion cpu has separate buses for code and data (Harvard architecture) but
5
* does not have caches by default. This linker script targets that 'bare'
6
* system configuration. It is meant for early testing and debugging.
7
*
8
* This script will split the object file in two areas so that they can be put
9
* in separate memory blocks:
10
* 1.- Code area (text output section)
11
* 2.- Data area (sdata, data and bss output sections)
12
*
13
* Since data constants can't be reached from the code bus, constant data
14
* (usually in section rodata) needs to be put in the same space as other data.
15
* This is the main purpose of this file.
16
* Alternatively, we might jus implement a 3-port memory and leave all sections
17
* adjacent, but that would be too expensive (3-port memory would take about
18
* twice as many memory blocks for the same memory size).
19
*
20
* FIXME code and data RAM block sizes hardcoded
21
* FIXME code and data start addresses hardcoded
22
*/
23
 
24
/* Make sure the first linked file is ths startup code from boot.s */
25
/* (We might put boot.o in the ld command line, BEFORE all other files) */
26
STARTUP(boot.o)
27
 
28
/* Default object output format is ELF big endian */
29
OUTPUT_FORMAT(elf32-big)
30
 
31
 
32
 
33
SECTIONS {
34
    /* Put all code at CODE area */
35
    .text 0x00000000 : {
36
        _ftext = . ;
37
        * (.text);
38
 
39
 
40
    } = 0 /* fill gaps with zeros */
41
 
42
    /* Mark end of executable code */
43
    _ecode = .;
44
    /* mark end of read-only code */
45
    _etext = .;
46
    PROVIDE (etext = .);
47
 
48
 
49
    /**** Put all data, including read-only, at DATA area */
50
 
51
    .data 0x00010000 : {
52
        _fdata = . ;
53
        * (.data);
54
        * (.data.*);
55
 
56
        /* Conventionally, symbol _gp points to the middle of a 64K area at the
57
           start of the sdata section ('small data section'). Register $gp is
58
           loaded with _gp at program startup (in boot.s) so that data in that
59
           area can be reached with just one instruction.
60
           Note that the compiler/assembler will put data in the sdata section
61
           only if it is small enough (see as/gcc docs, -G option and others).
62
           FIXME this feature has not been tested.
63
        */
64
        _gp = . + 0x7ff0; /* 0x7ff0 -> middle of 64K area */
65
        *(.lit8);
66
        *(.lit4);
67
        *(.sdata);
68
        *(.sbss);
69
        *(.gnu.linkonce.s*);
70
        *(.rodata);
71
        *(.rodata.*);
72
        /* mark end of initialised data */
73
        _edata  =  .;
74
        PROVIDE (edata = .);
75
 
76
        /* start bss on dword boundary for easier clearing */
77
        . = ALIGN(8);
78
 
79
    }
80
 
81
    /* start bss on dword boundary for easier clearing */
82
    . = ALIGN(8);
83
 
84
    /* mark start of uninitialised data */
85
    __bss_start = .;
86
    _fbss = __bss_start;
87
 
88
    .bss : {
89
        /* *(.sbss); */
90
        *(.dynbss);
91
        *(COMMON);
92
        * (.bss);
93
        _end = . ;
94
    }
95
    /* mark end of uninitialised data */
96
    _end = . ;
97
    PROVIDE (end = .);
98
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.