Targets genererate their own firmware
[yari.git] / shared / gdbstub / ld.script.little
blob7e638d739ee2ef7142b3fa695dd7e1cc133d040a
1 OUTPUT_FORMAT("elf32-littlemips")
2 OUTPUT_ARCH(mips)
3 ENTRY(kernel_entry)
4 SECTIONS
6   /* Read-only sections, merged into text segment: */
7   . = 0x80000000;
8   .rel.text      : { *(.rel.text)       }
9   .rela.text     : { *(.rela.text)      }
10   .rel.data      : { *(.rel.data)       }
11   .rela.data     : { *(.rela.data)      }
12   .rel.rodata    : { *(.rel.rodata)     }
13   .rela.rodata   : { *(.rela.rodata)    }
14   .rel.got       : { *(.rel.got)        }
15   .rela.got      : { *(.rela.got)       }
16   .rel.ctors     : { *(.rel.ctors)      }
17   .rela.ctors    : { *(.rela.ctors)     }
18   .rel.dtors     : { *(.rel.dtors)      }
19   .rela.dtors    : { *(.rela.dtors)     }
20   .rel.init      : { *(.rel.init)       }
21   .rela.init     : { *(.rela.init)      }
22   .rel.fini      : { *(.rel.fini)       }
23   .rela.fini     : { *(.rela.fini)      }
24   .rel.bss       : { *(.rel.bss)        }
25   .rela.bss      : { *(.rela.bss)       }
26   .rel.plt       : { *(.rel.plt)        }
27   .rela.plt      : { *(.rela.plt)       }
28   .init          : { *(.init)           } =0
29   .text      :
30   {
31     _ftext = . ;
32     *(.text)
33     *(.rodata)
34     *(.rodata1)
35     /* .gnu.warning sections are handled specially by elf32.em.  */
36     *(.gnu.warning)
37   } =0
38   _etext = .;
39   PROVIDE (etext = .);
41   /* Startup code */
42   . = ALIGN(4096);
43   __init_begin = .;
44   .text.init : { *(.text.init) }
45   .data.init : { *(.data.init) }
46   . = ALIGN(4096);      /* Align double page for init_task_union */
47   __init_end = .;
49   .fini      : { *(.fini)    } =0
50   .reginfo : { *(.reginfo) }
51   /* Adjust the address for the data segment.  We want to adjust up to
52      the same address within the page on the next page up.  It would
53      be more correct to do this:
54        . = .;
55      The current expression does not correctly handle the case of a
56      text segment ending precisely at the end of a page; it causes the
57      data segment to skip a page.  The above expression does not have
58      this problem, but it will currently (2/95) cause BFD to allocate
59      a single segment, combining both text and data, for this case.
60      This will prevent the text segment from being shared among
61      multiple executions of the program; I think that is more
62      important than losing a page of the virtual address space (note
63      that no actual memory is lost; the page which is skipped can not
64      be referenced).  */
65   . = .;
66   .data    :
67   {
68     _fdata = . ;
69     *(.data)
70     CONSTRUCTORS
71   }
72   .data1   : { *(.data1) }
73   _gp = . + 0x8000;
74   .lit8 : { *(.lit8) }
75   .lit4 : { *(.lit4) }
76   .ctors         : { *(.ctors)   }
77   .dtors         : { *(.dtors)   }
78   .got           : { *(.got.plt) *(.got) }
79   .dynamic       : { *(.dynamic) }
80   /* We want the small data sections together, so single-instruction offsets
81      can access them all, and initialized data all before uninitialized, so
82      we can shorten the on-disk segment size.  */
83   .sdata     : { *(.sdata) }
84   _edata  =  .;
85   PROVIDE (edata = .);
87   __bss_start = .;
88   _fbss = .;
89   .bss       :
90   {
91    *(.dynbss)
92    *(.bss)
93    *(COMMON)
94   _end = . ;
95   PROVIDE (end = .);
96    *(.sbss)
97    *(.scommon)
98   }
99   /* These are needed for ELF backends which have not yet been
100      converted to the new style linker.  */
101   .stab 0 : { *(.stab) }
102   .stabstr 0 : { *(.stabstr) }
103   /* DWARF debug sections.
104      Symbols in the .debug DWARF section are relative to the beginning of the
105      section so we begin .debug at 0.  It's not clear yet what needs to happen
106      for the others.   */
107   .debug          0 : { *(.debug) }
108   .debug_srcinfo  0 : { *(.debug_srcinfo) }
109   .debug_aranges  0 : { *(.debug_aranges) }
110   .debug_pubnames 0 : { *(.debug_pubnames) }
111   .debug_sfnames  0 : { *(.debug_sfnames) }
112   .line           0 : { *(.line) }
113   /* These must appear regardless of  .  */
114   .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
115   .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }