Back to home page

OSCL-LXR

 
 

    


0001 #include <asm/vmlinux.lds.h>
0002 #include <asm/page.h>
0003 
0004 OUTPUT_FORMAT(ELF_FORMAT)
0005 OUTPUT_ARCH(ELF_ARCH)
0006 ENTRY(_start)
0007 jiffies = jiffies_64;
0008 
0009 VERSION {
0010   {
0011     local: *;
0012   };
0013 }
0014 
0015 SECTIONS
0016 {
0017   PROVIDE (__executable_start = START);
0018   . = START + SIZEOF_HEADERS;
0019   .interp         : { *(.interp) }
0020   __binary_start = .;
0021   . = ALIGN(4096);      /* Init code and data */
0022   _text = .;
0023   INIT_TEXT_SECTION(PAGE_SIZE)
0024 
0025   . = ALIGN(PAGE_SIZE);
0026 
0027   /* Read-only sections, merged into text segment: */
0028   .hash           : { *(.hash) }
0029   .gnu.hash       : { *(.gnu.hash) }
0030   .dynsym         : { *(.dynsym) }
0031   .dynstr         : { *(.dynstr) }
0032   .gnu.version    : { *(.gnu.version) }
0033   .gnu.version_d  : { *(.gnu.version_d) }
0034   .gnu.version_r  : { *(.gnu.version_r) }
0035   .rel.init       : { *(.rel.init) }
0036   .rela.init      : { *(.rela.init) }
0037   .rel.text       : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) }
0038   .rela.text      : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) }
0039   .rel.fini       : { *(.rel.fini) }
0040   .rela.fini      : { *(.rela.fini) }
0041   .rel.rodata     : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) }
0042   .rela.rodata    : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) }
0043   .rel.data       : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) }
0044   .rela.data      : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
0045   .rel.tdata      : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
0046   .rela.tdata     : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
0047   .rel.tbss   : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) }
0048   .rela.tbss      : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
0049   .rel.ctors      : { *(.rel.ctors) }
0050   .rela.ctors     : { *(.rela.ctors) }
0051   .rel.dtors      : { *(.rel.dtors) }
0052   .rela.dtors     : { *(.rela.dtors) }
0053   .rel.got        : { *(.rel.got) }
0054   .rela.got       : { *(.rela.got) }
0055   .rel.bss        : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) }
0056   .rela.bss       : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
0057   .rel.plt : {
0058     *(.rel.plt)
0059     PROVIDE_HIDDEN(__rel_iplt_start = .);
0060     *(.rel.iplt)
0061     PROVIDE_HIDDEN(__rel_iplt_end = .);
0062   }
0063   .rela.plt : {
0064     *(.rela.plt)
0065     PROVIDE_HIDDEN(__rela_iplt_start = .);
0066     *(.rela.iplt)
0067     PROVIDE_HIDDEN(__rela_iplt_end = .);
0068   }
0069   .init           : {
0070     KEEP (*(.init))
0071   } =0x90909090
0072   .plt            : { *(.plt) }
0073   .text           : {
0074     _stext = .;
0075     TEXT_TEXT
0076     SCHED_TEXT
0077     CPUIDLE_TEXT
0078     LOCK_TEXT
0079     IRQENTRY_TEXT
0080     SOFTIRQENTRY_TEXT
0081     *(.fixup)
0082     *(.stub .text.* .gnu.linkonce.t.*)
0083     /* .gnu.warning sections are handled specially by elf32.em.  */
0084     *(.gnu.warning)
0085 
0086     . = ALIGN(PAGE_SIZE);
0087   } =0x90909090
0088   . = ALIGN(PAGE_SIZE);
0089   .syscall_stub : {
0090     __syscall_stub_start = .;
0091     *(.__syscall_stub*)
0092     __syscall_stub_end = .;
0093   }
0094   .fini           : {
0095     KEEP (*(.fini))
0096   } =0x90909090
0097 
0098   .kstrtab : { *(.kstrtab) }
0099 
0100   #include <asm/common.lds.S>
0101 
0102   __init_begin = .;
0103   init.data : { INIT_DATA }
0104   __init_end = .;
0105 
0106   /* Ensure the __preinit_array_start label is properly aligned.  We
0107      could instead move the label definition inside the section, but
0108      the linker would then create the section even if it turns out to
0109      be empty, which isn't pretty.  */
0110   . = ALIGN(32 / 8);
0111   .preinit_array     : { *(.preinit_array) }
0112   .init_array     : {
0113     *(.kasan_init)
0114     *(.init_array.*)
0115     *(.init_array)
0116   }
0117   .fini_array     : { *(.fini_array) }
0118   .data           : {
0119     INIT_TASK_DATA(KERNEL_STACK_SIZE)
0120     . = ALIGN(KERNEL_STACK_SIZE);
0121     *(.data..init_irqstack)
0122     DATA_DATA
0123     *(.data.* .gnu.linkonce.d.*)
0124     SORT(CONSTRUCTORS)
0125   }
0126   .data1          : { *(.data1) }
0127   .tdata      : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
0128   .tbss       : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
0129   .eh_frame       : { KEEP (*(.eh_frame)) }
0130   .gcc_except_table   : { *(.gcc_except_table) }
0131   .dynamic        : { *(.dynamic) }
0132   .ctors          : {
0133     /* gcc uses crtbegin.o to find the start of
0134        the constructors, so we make sure it is
0135        first.  Because this is a wildcard, it
0136        doesn't matter if the user does not
0137        actually link against crtbegin.o; the
0138        linker won't look for a file to match a
0139        wildcard.  The wildcard also means that it
0140        doesn't matter which directory crtbegin.o
0141        is in.  */
0142     KEEP (*crtbegin.o(.ctors))
0143     /* We don't want to include the .ctor section from
0144        from the crtend.o file until after the sorted ctors.
0145        The .ctor section from the crtend file contains the
0146        end of ctors marker and it must be last */
0147     KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
0148     KEEP (*(SORT(.ctors.*)))
0149     KEEP (*(.ctors))
0150   }
0151   .dtors          : {
0152     KEEP (*crtbegin.o(.dtors))
0153     KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
0154     KEEP (*(SORT(.dtors.*)))
0155     KEEP (*(.dtors))
0156   }
0157   .jcr            : { KEEP (*(.jcr)) }
0158   .got            : { *(.got.plt) *(.got) }
0159   _edata = .;
0160   PROVIDE (edata = .);
0161   .bss            : {
0162    __bss_start = .;
0163    *(.dynbss)
0164    *(.bss .bss.* .gnu.linkonce.b.*)
0165    *(COMMON)
0166    /* Align here to ensure that the .bss section occupies space up to
0167       _end.  Align after .bss to ensure correct alignment even if the
0168       .bss section disappears because there are no input sections.  */
0169    . = ALIGN(32 / 8);
0170   . = ALIGN(32 / 8);
0171   }
0172    __bss_stop = .;
0173   _end = .;
0174   PROVIDE (end = .);
0175 
0176   STABS_DEBUG
0177   DWARF_DEBUG
0178   ELF_DETAILS
0179 
0180   DISCARDS
0181 }