Subversion Repositories Kolibri OS

Rev

Rev 2828 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2828 Serge 1
/* Default linker script, for normal executables */
2
OUTPUT_FORMAT("kos32")
3
OUTPUT_ARCH("")
4
ENTRY(_start)
5
SECTIONS
6
{
7
    .text 0x000000:
8
    {
9
        LONG(0x554e454D);
10
        LONG(0x32305445);
11
        LONG(1);
12
        LONG(_start);
13
        LONG(___iend);
14
        LONG(___memsize);
15
        LONG(___stacktop);
16
        LONG(___cmdline);
17
        LONG(___pgmname);     /*  full path    */
18
        LONG(0);              /*FIXME tls data */
19
        *(.init)
20
        *(.text)
21
        *(SORT(.textkos32))
22
        *(.text.*)
23
        *(.glue_7t)
24
        *(.glue_7)
25
        ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
26
                        LONG (-1);*(.ctors); *(.ctor); *(SORT(.ctors.*));  LONG (0);
27
        ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
28
                        LONG (-1); *(.dtors); *(.dtor); *(SORT(.dtors.*));  LONG (0);
29
        *(.fini)
30
    /* ??? Why is .gcc_exc here?  */
31
        *(.gcc_exc)
32
        PROVIDE (etext = .);
33
        *(.gcc_except_table)
34
    }
35
    .rdata ALIGN(16) :
36
    {
37
        *(.rdata)
38
        *(SORT(.rdatakos32))
39
        ___RUNTIME_PSEUDO_RELOC_LIST__ = .;
40
        __RUNTIME_PSEUDO_RELOC_LIST__ = .;
41
        *(.rdata_runtime_pseudo_reloc)
42
        ___RUNTIME_PSEUDO_RELOC_LIST_END__ = .;
43
        __RUNTIME_PSEUDO_RELOC_LIST_END__ = .;
44
    }
45
    .CRT ALIGN(16) :
46
    {
47
         ___crt_xc_start__ = . ;
48
        *(SORT(.CRT*))  /* C initialization */
49
        ___crt_xc_end__ = . ;
50
        ___crt_xi_start__ = . ;
51
        *(SORT(.CRT*))  /* C++ initialization */
52
        ___crt_xi_end__ = . ;
53
        ___crt_xl_start__ = . ;
54
        *(SORT(.CRT*))  /* TLS callbacks */
55
    /* ___crt_xl_end__ is defined in the TLS Directory support code */
56
        ___crt_xp_start__ = . ;
57
        *(SORT(.CRT*))  /* Pre-termination */
58
        ___crt_xp_end__ = . ;
59
        ___crt_xt_start__ = . ;
60
        *(SORT(.CRT*))  /* Termination */
61
        ___crt_xt_end__ = . ;
62
    }
63
    .data ALIGN(16) :
64
    {
65
        __data_start__ = . ;
66
        *(.data)
67
        *(.data2)
68
        *(SORT(.datakos32))
69
        *(.jcr)
70
        __CRT_MT = .;
71
        LONG(0);
72
        __data_end__ = . ;
73
        *(.data_cygwin_nocopy)
74
    }
75
    .eh_frame ALIGN(16) :
76
    {
77
        *(.eh_frame)
78
        ___iend = . ;
79
    }
80
    bss ALIGN(16):
81
    {
82
        *(.bss)
83
        *(COMMON)
84
        . = ALIGN(16);
85
        ___cmdline = .;
86
        . = . + 256;
87
        ___pgmname = .;
88
        ___menuet__app_path_area = .;
89
        . = . + 1024 + 16;
90
        ___stacktop = .;
91
        ___memsize = . ;
92
    }
93
  /DISCARD/ :
94
  {
95
    *(.debug)
96
    *(.debug)
97
    *(.debug)
98
    *(.drectve)
99
    *(.note.GNU-stack)
100
    *(.comment)
101
    *(.debug_abbrev)
102
    *(.debug_info)
103
    *(.debug_line)
104
    *(.debug_frame)
105
    *(.debug_loc)
106
    *(.debug_pubnames)
107
    *(.debug_aranges)
108
    *(.debug_ranges)
109
  }
110
}