vmlinux.lds.S 2.7 KB
Newer Older
L
Linus Torvalds 已提交
1 2 3 4
/* $Id: vmlinux.lds.S,v 1.8 2003/05/16 17:18:14 lethal Exp $
 * ld script to make SuperH Linux kernel
 * Written by Niibe Yutaka
 */
P
Paul Mundt 已提交
5
#include <asm/thread_info.h>
6
#include <asm/cache.h>
L
Linus Torvalds 已提交
7 8 9 10 11 12 13 14 15 16 17
#include <asm-generic/vmlinux.lds.h>

#ifdef CONFIG_CPU_LITTLE_ENDIAN
OUTPUT_FORMAT("elf32-sh-linux", "elf32-sh-linux", "elf32-sh-linux")
#else
OUTPUT_FORMAT("elf32-shbig-linux", "elf32-shbig-linux", "elf32-shbig-linux")
#endif
OUTPUT_ARCH(sh)
ENTRY(_start)
SECTIONS
{
P
Paul Mundt 已提交
18
  . = CONFIG_PAGE_OFFSET + CONFIG_MEMORY_START + CONFIG_ZERO_PAGE_OFFSET;
L
Linus Torvalds 已提交
19 20 21 22 23 24
  _text = .;			/* Text and read-only data */
  text = .;			/* Text and read-only data */
  .empty_zero_page : {
	*(.empty_zero_page)
	} = 0
  .text : {
25
	TEXT_TEXT
L
Linus Torvalds 已提交
26 27 28 29 30 31 32 33 34 35 36
	SCHED_TEXT
	LOCK_TEXT
	*(.fixup)
	*(.gnu.warning)
	} = 0x0009

  . = ALIGN(16);		/* Exception table */
  __start___ex_table = .;
  __ex_table : { *(__ex_table) }
  __stop___ex_table = .;

P
Paul Mundt 已提交
37 38
  _etext = .;			/* End of text section */

L
Linus Torvalds 已提交
39 40
  RODATA

P
Paul Mundt 已提交
41
  BUG_TABLE
L
Linus Torvalds 已提交
42 43 44 45 46

  .data : {			/* Data */
	*(.data)

 	 /* Align the initial ramdisk image (INITRD) on page boundaries. */
P
Paul Mundt 已提交
47
 	 . = ALIGN(PAGE_SIZE);
L
Linus Torvalds 已提交
48 49
 	 __rd_start = .;
 	 *(.initrd)
P
Paul Mundt 已提交
50
 	 . = ALIGN(PAGE_SIZE);
L
Linus Torvalds 已提交
51 52 53 54 55
 	 __rd_end = .;

	CONSTRUCTORS
	}

P
Paul Mundt 已提交
56
  . = ALIGN(PAGE_SIZE);
P
Paul Mundt 已提交
57
  .data.page_aligned : { *(.data.page_aligned) }
P
Paul Mundt 已提交
58 59 60 61
  __nosave_begin = .;
  .data_nosave : { *(.data.nosave) }
  . = ALIGN(PAGE_SIZE);
  __nosave_end = .;
L
Linus Torvalds 已提交
62

63
  . = ALIGN(PAGE_SIZE);
L
Linus Torvalds 已提交
64 65 66 67 68 69 70
  __per_cpu_start = .;
  .data.percpu : { *(.data.percpu) }
  __per_cpu_end = .;
  .data.cacheline_aligned : { *(.data.cacheline_aligned) }

  _edata = .;			/* End of data section */

P
Paul Mundt 已提交
71
  . = ALIGN(THREAD_SIZE);		/* init_task */
L
Linus Torvalds 已提交
72 73
  .data.init_task : { *(.data.init_task) }

P
Paul Mundt 已提交
74
  . = ALIGN(PAGE_SIZE);		/* Init code and data */
L
Linus Torvalds 已提交
75 76 77 78 79 80 81 82 83 84 85
  __init_begin = .;
  _sinittext = .;
  .init.text : { *(.init.text) }
  _einittext = .;
  .init.data : { *(.init.data) }
  . = ALIGN(16);
  __setup_start = .;
  .init.setup : { *(.init.setup) }
  __setup_end = .;
  __initcall_start = .;
  .initcall.init : {
86
	INITCALLS
L
Linus Torvalds 已提交
87 88 89 90 91 92
  }
  __initcall_end = .;
  __con_initcall_start = .;
  .con_initcall.init : { *(.con_initcall.init) }
  __con_initcall_end = .;
  SECURITY_INIT
93 94

#ifdef CONFIG_BLK_DEV_INITRD
L
Linus Torvalds 已提交
95 96 97
  __initramfs_start = .;
  .init.ramfs : { *(.init.ramfs) }
  __initramfs_end = .;
98 99
#endif

L
Linus Torvalds 已提交
100 101 102
  __machvec_start = .;
  .init.machvec : { *(.init.machvec) }
  __machvec_end = .;
P
Paul Mundt 已提交
103
  . = ALIGN(PAGE_SIZE);
L
Linus Torvalds 已提交
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
  __init_end = .;

  . = ALIGN(4);
  __bss_start = .;		/* BSS */
  .bss : { *(.bss) }

  . = ALIGN(4);
  _end = . ;

  /* When something in the kernel is NOT compiled as a module, the
   * module cleanup code and data are put into these segments.  Both
   * can then be thrown away, as cleanup code is never called unless
   * it's a module.
   */
  /DISCARD/ : {
	*(.exitcall.exit)
	}

P
Paul Mundt 已提交
122 123 124
  STABS_DEBUG

  DWARF_DEBUG
L
Linus Torvalds 已提交
125
}