linux/arch/c6x/kernel/vmlinux.lds.S
<<
>>
Prefs
   1/*
   2 * ld script for the c6x kernel
   3 *
   4 *  Copyright (C) 2010, 2011 Texas Instruments Incorporated
   5 *  Mark Salter <msalter@redhat.com>
   6 */
   7#include <asm-generic/vmlinux.lds.h>
   8#include <asm/thread_info.h>
   9#include <asm/page.h>
  10
  11ENTRY(_c_int00)
  12
  13#if defined(CONFIG_CPU_BIG_ENDIAN)
  14jiffies = jiffies_64 + 4;
  15#else
  16jiffies = jiffies_64;
  17#endif
  18
  19#define READONLY_SEGMENT_START  \
  20        . = PAGE_OFFSET;
  21#define READWRITE_SEGMENT_START \
  22        . = ALIGN(128);         \
  23        _data_lma = .;
  24
  25SECTIONS
  26{
  27        /*
  28         * Start kernel read only segment
  29         */
  30        READONLY_SEGMENT_START
  31
  32        .vectors :
  33        {
  34                _vectors_start = .;
  35                *(.vectors)
  36                . = ALIGN(0x400);
  37                _vectors_end = .;
  38        }
  39
  40        /*
  41         * This section contains data which may be shared with other
  42         * cores. It needs to be a fixed offset from PAGE_OFFSET
  43         * regardless of kernel configuration.
  44         */
  45        .virtio_ipc_dev :
  46        {
  47                *(.virtio_ipc_dev)
  48        }
  49
  50        . = ALIGN(PAGE_SIZE);
  51        __init_begin = .;
  52        .init :
  53        {
  54                _sinittext = .;
  55                HEAD_TEXT
  56                INIT_TEXT
  57                _einittext = .;
  58        }
  59
  60        INIT_DATA_SECTION(16)
  61
  62        PERCPU_SECTION(128)
  63
  64        . = ALIGN(PAGE_SIZE);
  65        __init_end = .;
  66
  67        .text :
  68        {
  69                _text = .;
  70                _stext = .;
  71                TEXT_TEXT
  72                SCHED_TEXT
  73                LOCK_TEXT
  74                IRQENTRY_TEXT
  75                SOFTIRQENTRY_TEXT
  76                KPROBES_TEXT
  77                *(.fixup)
  78                *(.gnu.warning)
  79        }
  80
  81        EXCEPTION_TABLE(16)
  82        NOTES
  83
  84        RO_DATA_SECTION(PAGE_SIZE)
  85        .const :
  86        {
  87                *(.const .const.* .gnu.linkonce.r.*)
  88                *(.switch)
  89        }
  90
  91        . = ALIGN (8) ;
  92        __fdt_blob : AT(ADDR(__fdt_blob) - LOAD_OFFSET)
  93        {
  94                _fdt_start = . ;        /* place for fdt blob */
  95                *(__fdt_blob) ;         /* Any link-placed DTB */
  96                BYTE(0);                /* section always has contents */
  97                . = _fdt_start + 0x4000;        /* Pad up to 16kbyte */
  98                _fdt_end = . ;
  99        }
 100
 101        _etext = .;
 102
 103        /*
 104         * Start kernel read-write segment.
 105         */
 106        READWRITE_SEGMENT_START
 107        _sdata = .;
 108
 109        .fardata : AT(ADDR(.fardata) - LOAD_OFFSET)
 110        {
 111                INIT_TASK_DATA(THREAD_SIZE)
 112                NOSAVE_DATA
 113                PAGE_ALIGNED_DATA(PAGE_SIZE)
 114                CACHELINE_ALIGNED_DATA(128)
 115                READ_MOSTLY_DATA(128)
 116                DATA_DATA
 117                CONSTRUCTORS
 118                *(.data1)
 119                *(.fardata .fardata.*)
 120                *(.data.debug_bpt)
 121        }
 122
 123        .neardata ALIGN(8) : AT(ADDR(.neardata) - LOAD_OFFSET)
 124        {
 125                *(.neardata2 .neardata2.* .gnu.linkonce.s2.*)
 126                *(.neardata .neardata.* .gnu.linkonce.s.*)
 127                . = ALIGN(8);
 128        }
 129
 130        _edata = .;
 131
 132        __bss_start = .;
 133        SBSS(8)
 134        BSS(8)
 135        .far :
 136        {
 137                . = ALIGN(8);
 138                *(.dynfar)
 139                *(.far .far.* .gnu.linkonce.b.*)
 140                . = ALIGN(8);
 141        }
 142        __bss_stop = .;
 143
 144        _end = .;
 145
 146        DWARF_DEBUG
 147
 148        /DISCARD/ :
 149        {
 150                  EXIT_TEXT
 151                  EXIT_DATA
 152                  EXIT_CALL
 153                  *(.discard)
 154                  *(.discard.*)
 155                  *(.interp)
 156        }
 157}
 158