Changeset dc39377 in rtems for c/src/lib


Ignore:
Timestamp:
Jul 10, 2000, 7:09:37 PM (20 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
256cbec
Parents:
74d5216
Message:

Now links although linkcmds will not work on real hardware. But then
again neither will unlinked executables. :)

Location:
c/src/lib/libbsp/i960/rxgen960/startup
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/i960/rxgen960/startup/linkcmds

    r74d5216 rdc39377  
    1 /*------------------------------------*/
    2 /* rom.ld                             */
    3 /* Last change : 19. 4.95             */
    4 /*------------------------------------*
    5  * To build ROM based i960 image.
    6  *------------------------------------*/
    7 
    81/*
     2 *  This is not the real linkcmds for this target.  See
     3 *  linkcmds.real and make those work for you.  That linkcmds
     4 *  goes to great lengths to handplace certain object files
     5 *  in very specific locations. 
     6 *
    97 *  $Id$
    108 */
    119
     10/*
     11 * Declare some sizes.
     12 */
     13_RamBase = DEFINED(_RamBase) ? _RamBase : 0x0;
     14_RamSize = DEFINED(_RamSize) ? _RamSize : 1M;
     15_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
     16_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
    1217
    13 MEMORY
    14 {
    15   config : org = 0xFeffFF30, len = 0xd0
    16   eprom  : org = 0xfec00000, len = 1024K
    17 }
    18 
    19 
    20 _bootAddr = 0xa0200000;
    21 /*_HEAP = 0xA0100000 ; */
    22 _rom_ibr_cksum = -(_romStart + _rom_prcb);
    23 
    24 SECTIONS
    25 {
    26   prcb :
    27     {
    28       INPUT(rom_ibr.o)
    29     } > config
    30    
    31     /* Only monitor start point and fault handler
    32      * will live in ROM as far as text is concerned.
    33      * Only fault table will live in ROM as far as data
    34      * is concerned. 
    35      */
    36   romCode :
    37     {
    38         /* Make sure that the monitor start point
    39          * is the first location in EPROM.
    40          */
    41       rxgen_romld.o(.text)
    42         /* Procedures to copy code and
    43          * initialize bss in RAM.
    44          */
    45       sctns.o(.text)   
    46         /* Make Sure Fault Table (and its handler's data)
    47          * live here so that they wouldn't get destroyed).
    48          */
    49       asmfault.o   
    50       ihandler.o
    51       . = ALIGN(16);
    52       flttbl.o
    53         /* 16 byte aligned PRCB.
    54          */
    55       . = ALIGN(16);
    56         rom_prcb.o(.data)
    57       . = ALIGN(16);
    58         rom_cntrltbl.o(.data)
    59       . = ALIGN(16);
    60         intrtbl.o(.data)
    61       . = ALIGN(16);
    62         nulsystbl.o(.data)
    63       . = ALIGN(16);
    64         /* I need this symbol to know where code which is
    65          * to be copied reside in ROM. Align it on a 16
    66          * boundary.
    67          */       
    68       . = ALIGN(16); 
    69       _codeRomStart = .;   
    70     } > eprom
    71    
    72     /* All the rest of the code will live in RAM.
    73      * Relocation are created as though code resides
    74      * in RAM, while code is placed right after romCode.
    75      * This is responsiblity of the ROM monitor to
    76      * copy code into ROM.
    77      */   
    78   ramCode : AT(ADDR(romCode) + SIZEOF(romCode))
     18SECTIONS
     19{
     20    . = 0x0;
     21    .text :
    7922    {
    80         /* RAM-based code section start.
    81          * I need this symbol to know where to copy code
    82          * at initialization time .
    83          */
    84       _codeRamStart = .;
    85         /* RAM based fault recovery stuff.
    86          */
    87       _faultStart = .;
    88       asmstub.o
    89       fault.o
    90       _faultEnd = .;
    91         /* Check sum to gurantee that
    92          * the above section wasn't broken.
    93          */
    94       . = ALIGN(16);
    95       _faultCheckSum = .;
    96       . += 4;
    97         /* Fault Buffer to keep the state of
    98          * the fauled procedure.
    99          */
    100       _faultBuffer = .;
    101       . += 256;   
    102         /* All the rest of the text goes here.
    103          */
    104       . = ALIGN(16);   
    105       *(.text)
    106 /* NEW TEST TEST TEST TEST */
    107                 . = ALIGN (16);
    108 
    109         *(.eh_fram)
    110         . = ALIGN (16);
    111 
    112         /*
    113          * C++ constructors
    114          */
    115         __CTOR_LIST__ = .;
    116         LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
    117         *(.ctors)
    118         LONG(0)
    119         __CTOR_END__ = .;
    120         __DTOR_LIST__ = .;
    121         LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
    122         *(.dtors)
    123         LONG(0)
    124         __DTOR_END__ = .;
    125             etext = ALIGN( 0x10 ) ;
    126 /* END NEW TEST TEST TEST */
    127         /* 16 byte aligned PRCB.
    128          */
    129       . = ALIGN(16);
    130       prcb.o(.data)
    131         /* 16 byte aligned Control Table.
    132          */
    133       . = ALIGN(16);
    134       cntrltbl.o(.data)                 
    135       . = ALIGN(16);
    136         systbl.o(.data)
    137         /* All the rest of program defined data goes here.
    138          */
    139       *(.data)
    140         /* RAM-based code section end.
    141          * I need this symbol to know where to copy code
    142          * at initialization time .
    143          */   
    144       _codeRamEnd = .;
    145     } > eprom
    146  
    147     /* RAM based uninitialized data.
    148      */   
    149   bss (NOLOAD) :
    150     {
    151         /* BSS section start. I need this symbol to
    152          * zero BSS on initialization.
    153          */
    154         /* Heap.  Aligned on a 64 boundary */
    155       /* . = ALIGN(64);
    156       _heap_initial = .;
    157       . += 64K;*/
    158         /* Supervisor Stack. Aligned on a 16 boundary.
    159          */
    160       . = ALIGN(16);
    161       _svrStackPtr = .;
    162       . += 16K;
    163         /* Interrupt Stack. Aligned on a 16 boundary.
    164          */
    165       . = ALIGN(16);
    166       _intStackPtr = .;
    167       . += 16K;
    168         /* Program defined BSS.
    169          */
    170       _bssStart = .;
    171       _bss_start = .;
    172       *(.bss)
    173         /* Program defined COMMON.
    174          */
    175       *(COMMON)
    176       _end = .;
    177         /* BSS section end. I need this symbol to
    178          * zero BSS on initialization.
    179          */
    180       _bssEnd = .;
    181       _bssStart_1 = .;
    182       _bssEnd_1 = .;
    183     } > eprom
    184 
    185 }
    186 
    187 /*-------------*/
    188 /* End of file */
    189 /*-------------*/
     23         CREATE_OBJECT_SYMBOLS
     24        *(.text)
     25         _etext = .;
     26       
     27        ___CTOR_LIST__ = .;
     28        LONG((___CTOR_END__ - ___CTOR_LIST__) / 4 - 2)
     29        *(.ctors)
     30        LONG(0)
     31        ___CTOR_END__ = .;
     32        ___DTOR_LIST__ = .;
     33        LONG((___DTOR_END__ - ___DTOR_LIST__) / 4 - 2)
     34        *(.dtors)
     35        LONG(0)
     36        ___DTOR_END__ = .;
     37    } 
     38    .data SIZEOF(.text) + ADDR(.text):
     39    {
     40        *(.data)
     41        CONSTRUCTORS
     42         _edata = .;
     43    } 
     44    .bss SIZEOF(.data) + ADDR(.data):
     45    {
     46         _bss_start = .;
     47        *(.bss) 
     48        *(COMMON)
     49        . = ALIGN (64);
     50        _stack_init = .;
     51        . += _StackSize;
     52        _clear_end = .;
     53        _WorkspaceBase = .;
     54        . += 512K;      /* reserve some memory for workspace */
     55        _HeapBase = .;
     56        . += _HeapSize; /* reserve some memory for heap */
     57         _end = .;
     58         __end = .;
     59    }
     60}
Note: See TracChangeset for help on using the changeset viewer.