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

Subversion Repositories sardmips

[/] [sardmips/] [trunk/] [PROGRAMMING_CLASSIC/] [link.xn] - Blame information for rev 18

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 igorloi
/*
2
 * Linker script for the mips programs. Created for the 32bit mips
3
 * little endian achitecture.
4
 */
5
 
6
OUTPUT(program.elf)             /* Default output name                  */
7
OUTPUT_ARCH(mips)               /* Output arch is mips... no shit :-)   */
8
ENTRY(_start)                   /* Entry point for program              */
9
 
10
SECTIONS
11
{
12
  /**** Code and read-only data ****/
13
 
14
   . = 0x00000000;              /* Here the code should be loaded so we */
15
                                /* set the location counter to this     */
16
                                /* address.                             */
17
   .text . : {
18
 
19
    _ftext = .;                 /* Start of code and read-only data     */
20
 
21
    crt0.o (.text)              /* This must be the first file since    */
22
                                /* this has the program entry point     */
23
    *(.text)                    /* The rest of the object files         */
24
    _ecode = .;                 /* End of code                          */
25
 
26
    *(.rodata)
27
 
28
    . = ALIGN(8);
29
    _etext = .;                 /* End of code and read-only data       */
30
  } = 0
31
 
32
  .reginfo : { *(.reginfo) }    /* Contains masks of registers used and */
33
                                /* $gp value ($gp register is not used) */
34
 
35
  /**** Initialised data ****/
36
 
37
  .data :
38
  {
39
    _fdata = .;                 /* Start of initialised data            */
40
    *(.data)
41
 
42
    . = ALIGN(8);
43
 
44
    *(.lit8)                    /* Place 8-byte constants here          */
45
    *(.lit4)                    /* Place 4-byte constants here          */
46
    *(.sdata)                   /* Place subsequent data                */
47
 
48
    . = ALIGN(8);
49
 
50
    _edata  = .;                /* End of initialised data              */
51
  }
52
 
53
  .reginfo :
54
  {
55
                                /**/
56
  }
57
 
58
  /**** Uninitialised data ****/
59
  . = 0x00000000;
60
  _fbss = .;                    /* Start of uninitialised data          */
61
 
62
  .sbss :
63
  {
64
    *(.dynsbss)
65
    *(.sbss)
66
    *(.sbss.*)
67
    *(.scommon)                 /* Place small common symbols here      */
68
  }
69
 
70
  .bss :
71
  {
72
    *(.dynbss)
73
    *(.bss)
74
    *(.bss.*)
75
    *(COMMON)                   /* Place common symbols here            */
76
 
77
    _sp_end = .;
78
    /* Allocate room for stack */
79
    .   =  ALIGN(8) ;
80
    .   = 0x4000   ;
81
    _sp =  . - 16;
82
  }
83
 
84
  _end = .;                     /* End of unitialised data              */
85
 
86
}
87
 
88
 

powered by: WebSVN 2.1.0

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