Changeset f58f0b45 in rtems


Ignore:
Timestamp:
10/11/99 15:28:04 (24 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
8ab8646
Parents:
3fd73d1
Message:

Now compiles for coff and elf.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/m68k/mvme167/startup/linkcmds

    r3fd73d1 rf58f0b45  
    11/*
    22 *  This file contains directives for the GNU linker which are specific
    3  *  to the Motorola MVME167 board.
     3 *  to the Motorola MVME167 board. This linker script produces ELF
     4 *  executables.
    45 *
    5  *  COPYRIGHT (c) 1989-1998.
    6  *  On-Line Applications Research Corporation (OAR).
    7  *  Copyright assigned to U.S. Government, 1994.
     6 *  Copyright (c) 1999, National Research Council of Canada.
     7 *  Some of this material was copied from binutils-2.9.4 linker scripts,
     8 *  and is therefore likely to be copyrighted by the Free Software
     9 *  Foundation, even though explicit copyright notices did not appear in
     10 *  those files.
    811 *
    912 *  The license and distribution terms for this file may be
     
    1114 *  http://www.OARcorp.com/rtems/license.html.
    1215 *
    13  *  Modifications of respective RTEMS file:
    14  *  Copyright (c) 1998, National Research Council of Canada
    15  *
    1616 *  $Id$
    1717 */
     18
     19/* These are not really needed here */
     20/* OUTPUT_FORMAT("elf32-m68k") */
     21OUTPUT_ARCH(m68k)
     22ENTRY(_start)
    1823
    1924/* Base address and size of RAM on the MVME167 */
     
    3439MEMORY
    3540{
    36     ram : org = 0x00800000, l = 4M
     41  /*  The location of RAM is the address space is configurable.
     42      This is where we put one board. The base address should be
     43      passed as a parameter when building multiprocessor images
     44      where each board resides at a different address. */
     45  ram  : org = 0x00800000, l = 4M
     46  rom  : org = 0xFF800000, l = 4M
     47  sram : org = 0xFFE00000, l = 128K
    3748}
    3849
    3950SECTIONS
    4051{
    41     .text 0x00800000 :
    42     {
    43                 text_start = . ;
    44                 *(.text)
    45                 . = ALIGN (16);
    46  
    47                 *(.eh_fram)
    48                 . = ALIGN (16);
    49                
    50                 *(.gcc_exc)
    51                 . = ALIGN (16);
    52  
    53                 /*
    54                  * C++ constructors
    55                  */
    56                 __CTOR_LIST__ = .;
    57                 LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
    58                 *(.ctors)
    59                 LONG(0)
    60                 __CTOR_END__ = .;
    61                 __DTOR_LIST__ = .;
    62                 LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
    63                 *(.dtors)
    64                 LONG(0)
    65                 __DTOR_END__ = .;
    66                 etext = ALIGN( 0x10 ) ;
    67     } >ram
    68 
    69     .data ADDR( .text ) + SIZEOF( .text ):
    70     {
    71         data_start = . ;
    72         *(.data)
    73         edata = ALIGN( 0x10 ) ;
    74     } >ram
    75 
    76     .bss ADDR( .data ) + SIZEOF( .data ):
    77     {
    78         bss_start = . ;
    79         *(.bss)
    80         *(COMMON)
    81         end = . ;
    82         _end = . ;
    83 
    84                 _HeapStart = .;
    85                 __HeapStart     = .;
    86                 . += HeapSize;  /* XXX -- Old gld can't handle this     */
    87                 _HeapEnd = .;
    88                 __HeapEnd = .;
    89                 _StackStart = .;
    90                 __StackStart = .;
    91                 . += StackSize; /* XXX -- Old gld can't handle this     */
    92                 /* . += 0x10000; */     /* HeapSize     for     old     gld     */
    93                 /* . += 0x1000;  */     /* StackSize for old gld */
    94                 . =     ALIGN (16);
    95                 _StackEnd = .;
    96                 __StackEnd = .;
    97                 stack_init = .;
    98                 clear_end =     .;
    99 
    100                 _WorkspaceBase = .;
    101                 __WorkspaceBase = .;
    102     } >ram
     52  /*
     53   * We want the entry point to be the first thing in memory.
     54   * Merge all read-only data into the .text section.
     55   */
     56  .text 0x00800000 :
     57  {
     58    text_start = . ;
     59   
     60    *(.text)
     61    *(.text.*)
     62    *(.stub)
     63
     64    /* C++ constructors/destructors */
     65    *(.gnu.linkonce.t*)
     66   
     67    /* Initialization and finalization code.
     68     *
     69     * Various files can provide initialization and finalization functions.
     70     * crtbegin.o and crtend.o are two instances. The body of these functions
     71     * are in .init and .fini sections. We accumulate the bodies here, and
     72     * prepend function prologues from crti.o and function epilogues from
     73     * crtn.o. crti.o must be linked first; crtn.o must be linked last.
     74     * Because these are wildcards, it doesn't matter if the user does not
     75     * actually link against crti.o and crtn.o; the linker won't look for a
     76     * file to match a wildcard.  The wildcard also means that it doesn't
     77     * matter which directory crti.o and crtn.o are in.
     78     */
     79    PROVIDE (_init = .);
     80    *crti.o(.init)
     81    *(.init)
     82    *crtn.o(.init)
     83   
     84    PROVIDE (_fini = .);
     85    *crti.o(.fini)
     86    *(.fini)
     87    *crtn.o(.init)
     88   
     89    . = ALIGN (16);
     90   
     91    /* C++ constructors and destructors for static objects.
     92     *
     93     * gcc uses crtbegin.o to find the start of the constructors and
     94     * destructors so we make sure it is first.  Because this is a wildcard,
     95     * it doesn't matter if the user does not actually link against
     96     * crtbegin.o; the linker won't look for a file to match a wildcard.  The
     97     * wildcard also means that it doesn't matter which directory crtbegin.o
     98     * is in. The constructor and destructor list are terminated in crtend.o.
     99     * The same comments apply to it.
     100     */
     101    PROVIDE (__CTOR_LIST__ = .);
     102    *crtbegin.o(.ctors)
     103    *(.ctors)
     104    *crtend.o(.ctors)
     105    PROVIDE (__CTOR_END__ = .);
     106
     107    PROVIDE (__DTOR_LIST__ = .);
     108    *crtbegin.o(.dtors)
     109    *(.dtors)
     110    *crtend.o(.dtors)
     111    PROVIDE (__DTOR_END__ = .);
     112   
     113    . = ALIGN (16);
     114   
     115    /* Exception frame info */
     116    *(.eh_frame)
     117   
     118    . = ALIGN (16);
     119
     120    /* Do we have any of these with egcs-1.x and higher? */
     121    *(.gcc_exc)
     122   
     123    . = ALIGN (16);
     124               
     125    _rodata_start = . ;
     126    *(.rodata)
     127    *(.rodata.*)
     128    *(.gnu.linkonce.r*)
     129    *(.rodata1)   
     130    _erodata = .;
     131
     132    _etext = .;
     133    PROVIDE (etext = .);
     134       
     135  } >ram =0x4e75
     136 
     137  . = ALIGN (16);
     138 
     139  .data :
     140  {
     141    data_start = .;
     142   
     143    *(.data)
     144    *(.data.*)
     145    *(.data1)
     146    *(.sdata)
     147    *(.gnu.linkonce.d*)
     148    *(.gcc_except_table)
     149   
     150    . = ALIGN (16);
     151    _edata = .;
     152    PROVIDE (edata = .);
     153  } >ram
     154
     155  .bss :
     156  {
     157    bss_start = .;
     158    *(.dynbss)
     159    *(.bss)
     160    *(COMMON)
     161    *(.sbss)
     162    *(.scommon) 
     163   
     164    . = ALIGN (16);
     165    _end = .;
     166    PROVIDE (end = .);
     167  } >ram
     168
     169  _HeapStart    = .;
     170  . += HeapSize;        /* XXX -- Old gld can't handle this     */
     171  _HeapEnd = .;
     172  _StackStart = .;
     173  . += StackSize;       /* XXX -- Old gld can't handle this     */
     174  /* . +=       0x10000; */     /* HeapSize     for     old     gld     */
     175  /* . +=       0x1000;  */     /* StackSize for old gld */
     176  . =   ALIGN (16);
     177  _StackEnd = .;
     178  stack_init = .;
     179  clear_end =   .;
     180
     181  _WorkspaceBase        = .;
     182
     183  /* Stabs debugging sections.  */
     184  .stab 0 : { *(.stab) }
     185  .stabstr 0 : { *(.stabstr) }
     186  .stab.excl 0 : { *(.stab.excl) }
     187  .stab.exclstr 0 : { *(.stab.exclstr) }
     188  .stab.index 0 : { *(.stab.index) }
     189  .stab.indexstr 0 : { *(.stab.indexstr) }
     190  .comment 0 : { *(.comment) }
     191 
     192  /* DWARF debug sections.
     193     Symbols in the DWARF debugging sections are relative to the beginning
     194     of the section so we begin them at 0.  */
     195  /* DWARF 1 */
     196  .debug          0 : { *(.debug) }
     197  .line           0 : { *(.line) }
     198 
     199  /* GNU DWARF 1 extensions */
     200  .debug_srcinfo  0 : { *(.debug_srcinfo) }
     201  .debug_sfnames  0 : { *(.debug_sfnames) }
     202 
     203  /* DWARF 1.1 and DWARF 2 */
     204  .debug_aranges  0 : { *(.debug_aranges) }
     205  .debug_pubnames 0 : { *(.debug_pubnames) }
     206 
     207  /* DWARF 2 */
     208  .debug_info     0 : { *(.debug_info) }
     209  .debug_abbrev   0 : { *(.debug_abbrev) }
     210  .debug_line     0 : { *(.debug_line) }
     211  .debug_frame    0 : { *(.debug_frame) }
     212  .debug_str      0 : { *(.debug_str) }
     213  .debug_loc      0 : { *(.debug_loc) }
     214  .debug_macinfo  0 : { *(.debug_macinfo) }
     215 
     216  /* SGI/MIPS DWARF 2 extensions */
     217  .debug_weaknames 0 : { *(.debug_weaknames) }
     218  .debug_funcnames 0 : { *(.debug_funcnames) }
     219  .debug_typenames 0 : { *(.debug_typenames) }
     220  .debug_varnames  0 : { *(.debug_varnames) }
     221  /* These must appear regardless of  .  */
    103222}
     223
Note: See TracChangeset for help on using the changeset viewer.