symbian-qemu-0.9.1-12/qemu-symbian-svp/i386.ld
changeset 1 2fb8b9db1c86
equal deleted inserted replaced
0:ffa851df0825 1:2fb8b9db1c86
       
     1 /* ld script to make i386 Linux kernel
       
     2  * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>;
       
     3  */
       
     4 OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
       
     5 OUTPUT_ARCH(i386)
       
     6 SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib"); SEARCH_DIR("=/usr/local/lib");
       
     7 ENTRY(_start)
       
     8 SECTIONS
       
     9 {
       
    10   /* Reserve a chunk of memory at a low address to prevent the host ld.so
       
    11      loading shared libraries where we want to put the target application.  */
       
    12   /* Older linkers can't add an extra program header for .reserved when
       
    13      SIZEOF_HEADERS is user.  Instead leave a chunk of space for them.  */
       
    14   /* Unfortunately this also effects the placement of program headers.
       
    15      Deliberately place it at a misaligned address before the area we want
       
    16      so that program headers can be allocated there.  */
       
    17   . = 0x1f00;
       
    18   .reserved : { *(.reserved) }
       
    19   /* Reserve a second area for programs linked at this address (PowerPC).  */
       
    20   . = 0x10000000;
       
    21   .reserved2 : { *(.reserved2) }
       
    22   /* Read-only sections, merged into text segment: */
       
    23   /* Leave space for headers for system emulation.  */
       
    24   . = 0x60000000 + 0xf00;
       
    25   .interp     : { *(.interp) 	}
       
    26   .hash          : { *(.hash)		}
       
    27   .dynsym        : { *(.dynsym)		}
       
    28   .dynstr        : { *(.dynstr)		}
       
    29   .gnu.version   : { *(.gnu.version)	}
       
    30   .gnu.version_d   : { *(.gnu.version_d)	}
       
    31   .gnu.version_r   : { *(.gnu.version_r)	}
       
    32   .rel.text      :
       
    33     { *(.rel.text) *(.rel.gnu.linkonce.t*) }
       
    34   .rela.text     :
       
    35     { *(.rela.text) *(.rela.gnu.linkonce.t*) }
       
    36   .rel.data      :
       
    37     { *(.rel.data) *(.rel.gnu.linkonce.d*) }
       
    38   .rela.data     :
       
    39     { *(.rela.data) *(.rela.gnu.linkonce.d*) }
       
    40   .rel.rodata    :
       
    41     { *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
       
    42   .rela.rodata   :
       
    43     { *(.rela.rodata) *(.rela.gnu.linkonce.r*) }
       
    44   .rel.got       : { *(.rel.got)		}
       
    45   .rela.got      : { *(.rela.got)		}
       
    46   .rel.ctors     : { *(.rel.ctors)	}
       
    47   .rela.ctors    : { *(.rela.ctors)	}
       
    48   .rel.dtors     : { *(.rel.dtors)	}
       
    49   .rela.dtors    : { *(.rela.dtors)	}
       
    50   .rel.init      : { *(.rel.init)	}
       
    51   .rela.init     : { *(.rela.init)	}
       
    52   .rel.fini      : { *(.rel.fini)	}
       
    53   .rela.fini     : { *(.rela.fini)	}
       
    54   .rel.bss       : { *(.rel.bss)		}
       
    55   .rela.bss      : { *(.rela.bss)		}
       
    56   .rel.plt       : { *(.rel.plt)		}
       
    57   .rela.plt      : { *(.rela.plt)		}
       
    58   .init          : { *(.init)	} =0x47ff041f
       
    59   .text      :
       
    60   {
       
    61     *(.text)
       
    62     /* .gnu.warning sections are handled specially by elf32.em.  */
       
    63     *(.gnu.warning)
       
    64     *(.gnu.linkonce.t*)
       
    65   } =0x47ff041f
       
    66   _etext = .;
       
    67   PROVIDE (etext = .);
       
    68   .fini      : { *(.fini)    } =0x47ff041f
       
    69   . = ALIGN(32 / 8);
       
    70   PROVIDE (__preinit_array_start = .);
       
    71   .preinit_array     : { *(.preinit_array) }
       
    72   PROVIDE (__preinit_array_end = .);
       
    73   PROVIDE (__init_array_start = .);
       
    74   .init_array     : { *(.init_array) }
       
    75   PROVIDE (__init_array_end = .);
       
    76   PROVIDE (__fini_array_start = .);
       
    77   .fini_array     : { *(.fini_array) }
       
    78   PROVIDE (__fini_array_end = .);
       
    79   .rodata    : { *(.rodata) *(.gnu.linkonce.r*) }
       
    80   .rodata1   : { *(.rodata1) }
       
    81   .reginfo : { *(.reginfo) }
       
    82   /* Adjust the address for the data segment.  We want to adjust up to
       
    83      the same address within the page on the next page up.  */
       
    84   . = ALIGN(0x100000) + (. & (0x100000 - 1));
       
    85   .tdata	  : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
       
    86   .tbss		  : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
       
    87   .data    :
       
    88   {
       
    89     *(.data)
       
    90     *(.gnu.linkonce.d*)
       
    91     CONSTRUCTORS
       
    92   }
       
    93   .data1   : { *(.data1) }
       
    94   .ctors         :
       
    95   {
       
    96     *(.ctors)
       
    97   }
       
    98   .dtors         :
       
    99   {
       
   100     *(.dtors)
       
   101   }
       
   102   .plt      : { *(.plt)	}
       
   103   .got           : { *(.got.plt) *(.got) }
       
   104   .dynamic       : { *(.dynamic) }
       
   105   /* We want the small data sections together, so single-instruction offsets
       
   106      can access them all, and initialized data all before uninitialized, so
       
   107      we can shorten the on-disk segment size.  */
       
   108   .sdata     : { *(.sdata) }
       
   109   _edata  =  .;
       
   110   PROVIDE (edata = .);
       
   111   __bss_start = .;
       
   112   .sbss      : { *(.sbss) *(.scommon) }
       
   113   .bss       :
       
   114   {
       
   115    *(.dynbss)
       
   116    *(.bss)
       
   117    *(COMMON)
       
   118   }
       
   119   _end = . ;
       
   120   PROVIDE (end = .);
       
   121   /* Stabs debugging sections.  */
       
   122   .stab 0 : { *(.stab) }
       
   123   .stabstr 0 : { *(.stabstr) }
       
   124   .stab.excl 0 : { *(.stab.excl) }
       
   125   .stab.exclstr 0 : { *(.stab.exclstr) }
       
   126   .stab.index 0 : { *(.stab.index) }
       
   127   .stab.indexstr 0 : { *(.stab.indexstr) }
       
   128   .comment 0 : { *(.comment) }
       
   129   /* DWARF debug sections.
       
   130      Symbols in the DWARF debugging sections are relative to the beginning
       
   131      of the section so we begin them at 0.  */
       
   132   /* DWARF 1 */
       
   133   .debug          0 : { *(.debug) }
       
   134   .line           0 : { *(.line) }
       
   135   /* GNU DWARF 1 extensions */
       
   136   .debug_srcinfo  0 : { *(.debug_srcinfo) }
       
   137   .debug_sfnames  0 : { *(.debug_sfnames) }
       
   138   /* DWARF 1.1 and DWARF 2 */
       
   139   .debug_aranges  0 : { *(.debug_aranges) }
       
   140   .debug_pubnames 0 : { *(.debug_pubnames) }
       
   141   /* DWARF 2 */
       
   142   .debug_info     0 : { *(.debug_info) }
       
   143   .debug_abbrev   0 : { *(.debug_abbrev) }
       
   144   .debug_line     0 : { *(.debug_line) }
       
   145   .debug_frame    0 : { *(.debug_frame) }
       
   146   .debug_str      0 : { *(.debug_str) }
       
   147   .debug_loc      0 : { *(.debug_loc) }
       
   148   .debug_macinfo  0 : { *(.debug_macinfo) }
       
   149   /* SGI/MIPS DWARF 2 extensions */
       
   150   .debug_weaknames 0 : { *(.debug_weaknames) }
       
   151   .debug_funcnames 0 : { *(.debug_funcnames) }
       
   152   .debug_typenames 0 : { *(.debug_typenames) }
       
   153   .debug_varnames  0 : { *(.debug_varnames) }
       
   154   /* These must appear regardless of  .  */
       
   155 
       
   156   /* Reserve a chunk of memory at a low address to prevent the host ld.so
       
   157      loading shared libraries where we want to put the target application.  */
       
   158 /*  . = 0x10000;
       
   159   .reserved : { *(.reserved) }*/
       
   160 }