tizen 2.3.1 release
[external/qemu.git] / roms / ipxe / src / arch / x86_64 / scripts / linux.lds
1 /* -*- sh -*- */
2
3 /*
4  * Linker script for x86_64 Linux images
5  *
6  */
7
8 OUTPUT_FORMAT ( "elf64-x86-64", "elf64-x86-64", "elf64-x86-64" )
9 OUTPUT_ARCH ( i386:x86-64 )
10
11 SECTIONS {
12         _max_align = 32;
13
14         . = 0x400000;
15
16         /*
17          * The text section
18          *
19          */
20
21         . = ALIGN ( _max_align );
22         .text : {
23                 _text = .;
24                 *(.text)
25                 *(.text.*)
26                 _etext = .;
27         }
28
29         /*
30          * The rodata section
31          *
32          */
33
34         . = ALIGN ( _max_align );
35         .rodata : {
36                 _rodata = .;
37                 *(.rodata)
38                 *(.rodata.*)
39                 _erodata = .;
40         }
41
42         /*
43          * The data section
44          *
45          * Adjust the address for the data segment.  We want to adjust up to
46          * the same address within the page on the next page up.
47          */
48
49         . = ALIGN (CONSTANT (MAXPAGESIZE)) - ((CONSTANT (MAXPAGESIZE) - .) & (CONSTANT (MAXPAGESIZE) - 1));
50         . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
51         .data : {
52                 _data = .;
53                 *(.data)
54                 *(.data.*)
55                 KEEP(*(SORT(.tbl.*)))
56                 _edata = .;
57         }
58
59         /*
60          * The bss section
61          *
62          */
63
64         . = ALIGN ( _max_align );
65         .bss : {
66                 _bss = .;
67                 *(.bss)
68                 *(.bss.*)
69                 *(COMMON)
70                 _ebss = .;
71         }
72
73         /*
74          * Weak symbols that need zero values if not otherwise defined
75          *
76          */
77
78         .weak 0x0 : {
79                 _weak = .;
80                 *(.weak)
81                 *(.weak.*)
82                 _eweak = .;
83         }
84         _assert = ASSERT ( ( _weak == _eweak ), ".weak is non-zero length" );
85
86         /*
87          * Dispose of the comment and note sections to make the link map
88          * easier to read
89          *
90          */
91
92         /DISCARD/ : {
93                 *(.comment)
94                 *(.comment.*)
95                 *(.note)
96                 *(.note.*)
97                 *(.rel)
98                 *(.rel.*)
99                 *(.discard)
100                 *(.discard.*)
101         }
102 }