symbian-qemu-0.9.1-12/qemu-symbian-svp/m68k.ld
changeset 1 2fb8b9db1c86
equal deleted inserted replaced
0:ffa851df0825 1:2fb8b9db1c86
       
     1 /* Script for -z combreloc: combine and sort reloc sections */
       
     2 OUTPUT_FORMAT("elf32-m68k", "elf32-m68k",
       
     3 	      "elf32-m68k")
       
     4 OUTPUT_ARCH(m68k)
       
     5 ENTRY(_start)
       
     6 SEARCH_DIR("/usr/local/m68k-linux/lib");
       
     7 /* Do we need any of these for elf?
       
     8    __DYNAMIC = 0;    */
       
     9 SECTIONS
       
    10 {
       
    11   /* Reserve a chunk of memory at a low address to prevent the host ld.so
       
    12      loading shared libraries where we want to put the target application.  */
       
    13   . = 0x10000;
       
    14   .reserved : { *(.reserved) }
       
    15   /* Read-only sections, merged into text segment: */
       
    16   /* Older linkers can't add an extra program header for .reserved when
       
    17      SIZEOF_HEADERS is user.  Instead leave a chunk of space for them.  */
       
    18   . = 0x60000000 + 0x10000 /*SIZEOF_HEADERS*/;
       
    19   /* Read-only sections, merged into text segment: */
       
    20   . = 0x60000000 + SIZEOF_HEADERS;
       
    21   .interp         : { *(.interp) }
       
    22   .hash           : { *(.hash) }
       
    23   .dynsym         : { *(.dynsym) }
       
    24   .dynstr         : { *(.dynstr) }
       
    25   .gnu.version    : { *(.gnu.version) }
       
    26   .gnu.version_d  : { *(.gnu.version_d) }
       
    27   .gnu.version_r  : { *(.gnu.version_r) }
       
    28   .rel.dyn        :
       
    29     {
       
    30       *(.rel.init)
       
    31       *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
       
    32       *(.rel.fini)
       
    33       *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
       
    34       *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
       
    35       *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
       
    36       *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
       
    37       *(.rel.ctors)
       
    38       *(.rel.dtors)
       
    39       *(.rel.got)
       
    40       *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
       
    41     }
       
    42   .rela.dyn       :
       
    43     {
       
    44       *(.rela.init)
       
    45       *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
       
    46       *(.rela.fini)
       
    47       *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
       
    48       *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
       
    49       *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
       
    50       *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
       
    51       *(.rela.ctors)
       
    52       *(.rela.dtors)
       
    53       *(.rela.got)
       
    54       *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
       
    55     }
       
    56   .rel.plt        : { *(.rel.plt) }
       
    57   .rela.plt       : { *(.rela.plt) }
       
    58   .init           :
       
    59   {
       
    60     KEEP (*(.init))
       
    61   } =0x4e754e75
       
    62   .plt            : { *(.plt) }
       
    63   .text           :
       
    64   {
       
    65     *(.text .stub .text.* .gnu.linkonce.t.*)
       
    66     /* .gnu.warning sections are handled specially by elf32.em.  */
       
    67     *(.gnu.warning)
       
    68   } =0x4e754e75
       
    69   .fini           :
       
    70   {
       
    71     KEEP (*(.fini))
       
    72   } =0x4e754e75
       
    73   PROVIDE (__etext = .);
       
    74   PROVIDE (_etext = .);
       
    75   PROVIDE (etext = .);
       
    76   .rodata         : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
       
    77   .rodata1        : { *(.rodata1) }
       
    78   .eh_frame_hdr : { *(.eh_frame_hdr) }
       
    79   /* Adjust the address for the data segment.  We want to adjust up to
       
    80      the same address within the page on the next page up.  */
       
    81   . = ALIGN(0x2000) + (. & (0x2000 - 1));
       
    82   /* Ensure the __preinit_array_start label is properly aligned.  We
       
    83      could instead move the label definition inside the section, but
       
    84      the linker would then create the section even if it turns out to
       
    85      be empty, which isn't pretty.  */
       
    86   . = ALIGN(32 / 8);
       
    87   PROVIDE (__preinit_array_start = .);
       
    88   .preinit_array     : { *(.preinit_array) }
       
    89   PROVIDE (__preinit_array_end = .);
       
    90   PROVIDE (__init_array_start = .);
       
    91   .init_array     : { *(.init_array) }
       
    92   PROVIDE (__init_array_end = .);
       
    93   PROVIDE (__fini_array_start = .);
       
    94   .fini_array     : { *(.fini_array) }
       
    95   PROVIDE (__fini_array_end = .);
       
    96   .data           :
       
    97   {
       
    98     *(.data .data.* .gnu.linkonce.d.*)
       
    99     SORT(CONSTRUCTORS)
       
   100   }
       
   101   .data1          : { *(.data1) }
       
   102   .tdata	  : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
       
   103   .tbss		  : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
       
   104   .eh_frame       : { KEEP (*(.eh_frame)) }
       
   105   .gcc_except_table   : { *(.gcc_except_table) }
       
   106   .dynamic        : { *(.dynamic) }
       
   107   .ctors          :
       
   108   {
       
   109     /* gcc uses crtbegin.o to find the start of
       
   110        the constructors, so we make sure it is
       
   111        first.  Because this is a wildcard, it
       
   112        doesn't matter if the user does not
       
   113        actually link against crtbegin.o; the
       
   114        linker won't look for a file to match a
       
   115        wildcard.  The wildcard also means that it
       
   116        doesn't matter which directory crtbegin.o
       
   117        is in.  */
       
   118     KEEP (*crtbegin.o(.ctors))
       
   119     /* We don't want to include the .ctor section from
       
   120        from the crtend.o file until after the sorted ctors.
       
   121        The .ctor section from the crtend file contains the
       
   122        end of ctors marker and it must be last */
       
   123     KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
       
   124     KEEP (*(SORT(.ctors.*)))
       
   125     KEEP (*(.ctors))
       
   126   }
       
   127   .dtors          :
       
   128   {
       
   129     KEEP (*crtbegin.o(.dtors))
       
   130     KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
       
   131     KEEP (*(SORT(.dtors.*)))
       
   132     KEEP (*(.dtors))
       
   133   }
       
   134   .jcr            : { KEEP (*(.jcr)) }
       
   135   .got            : { *(.got.plt) *(.got) }
       
   136   _edata = .;
       
   137   PROVIDE (edata = .);
       
   138   __bss_start = .;
       
   139   .bss            :
       
   140   {
       
   141    *(.dynbss)
       
   142    *(.bss .bss.* .gnu.linkonce.b.*)
       
   143    *(COMMON)
       
   144    /* Align here to ensure that the .bss section occupies space up to
       
   145       _end.  Align after .bss to ensure correct alignment even if the
       
   146       .bss section disappears because there are no input sections.  */
       
   147    . = ALIGN(32 / 8);
       
   148   }
       
   149   . = ALIGN(32 / 8);
       
   150   _end = .;
       
   151   PROVIDE (end = .);
       
   152   /* Stabs debugging sections.  */
       
   153   .stab          0 : { *(.stab) }
       
   154   .stabstr       0 : { *(.stabstr) }
       
   155   .stab.excl     0 : { *(.stab.excl) }
       
   156   .stab.exclstr  0 : { *(.stab.exclstr) }
       
   157   .stab.index    0 : { *(.stab.index) }
       
   158   .stab.indexstr 0 : { *(.stab.indexstr) }
       
   159   .comment       0 : { *(.comment) }
       
   160   /* DWARF debug sections.
       
   161      Symbols in the DWARF debugging sections are relative to the beginning
       
   162      of the section so we begin them at 0.  */
       
   163   /* DWARF 1 */
       
   164   .debug          0 : { *(.debug) }
       
   165   .line           0 : { *(.line) }
       
   166   /* GNU DWARF 1 extensions */
       
   167   .debug_srcinfo  0 : { *(.debug_srcinfo) }
       
   168   .debug_sfnames  0 : { *(.debug_sfnames) }
       
   169   /* DWARF 1.1 and DWARF 2 */
       
   170   .debug_aranges  0 : { *(.debug_aranges) }
       
   171   .debug_pubnames 0 : { *(.debug_pubnames) }
       
   172   /* DWARF 2 */
       
   173   .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
       
   174   .debug_abbrev   0 : { *(.debug_abbrev) }
       
   175   .debug_line     0 : { *(.debug_line) }
       
   176   .debug_frame    0 : { *(.debug_frame) }
       
   177   .debug_str      0 : { *(.debug_str) }
       
   178   .debug_loc      0 : { *(.debug_loc) }
       
   179   .debug_macinfo  0 : { *(.debug_macinfo) }
       
   180   /* SGI/MIPS DWARF 2 extensions */
       
   181   .debug_weaknames 0 : { *(.debug_weaknames) }
       
   182   .debug_funcnames 0 : { *(.debug_funcnames) }
       
   183   .debug_typenames 0 : { *(.debug_typenames) }
       
   184   .debug_varnames  0 : { *(.debug_varnames) }
       
   185 }