1 | OUTPUT_ARCH(powerpc) |
---|
2 | OUTPUT_FORMAT ("elf32-powerpc", "elf32-powerpc", "elf32-powerpc") |
---|
3 | /* Do we need any of these for elf? |
---|
4 | __DYNAMIC = 0; */ |
---|
5 | SECTIONS |
---|
6 | { |
---|
7 | .text : |
---|
8 | { |
---|
9 | /* We have to build the header by hand, painful since ppcboot |
---|
10 | format support is very poor in binutils. |
---|
11 | objdump -b ppcboot zImage --all-headers can be used to check. */ |
---|
12 | /* The following line can be added as a branch to use the same image |
---|
13 | * for netboot as for prepboots, the only problem is that objdump |
---|
14 | * did not in this case recognize the format since it insisted |
---|
15 | * in checking the x86 code area held only zeroes. |
---|
16 | */ |
---|
17 | LONG(0x48000000+start); |
---|
18 | . = 0x1be; BYTE(0x80); BYTE(0) |
---|
19 | BYTE(2); BYTE(0); BYTE(0x41); BYTE(1); |
---|
20 | BYTE(0x12); BYTE(0x4f); LONG(0); |
---|
21 | BYTE(((_edata + 0x1ff)>>9)&0xff); |
---|
22 | BYTE(((_edata + 0x1ff)>>17)&0xff); |
---|
23 | BYTE(((_edata + 0x1ff)>>25)&0xff); |
---|
24 | . = 0x1fe; |
---|
25 | BYTE(0x55); |
---|
26 | BYTE(0xaa); |
---|
27 | BYTE(start&0xff); |
---|
28 | BYTE((start>>8)&0xff); |
---|
29 | BYTE((start>>16)&0xff); |
---|
30 | BYTE((start>>24)&0xff); |
---|
31 | BYTE(_edata&0xff); |
---|
32 | BYTE((_edata>>8)&0xff); |
---|
33 | BYTE((_edata>>16)&0xff); |
---|
34 | BYTE((_edata>>24)&0xff); |
---|
35 | BYTE(0); /* flags */ |
---|
36 | BYTE(0); /* os_id */ |
---|
37 | BYTE(0x4C); BYTE(0x69); BYTE(0x6e); |
---|
38 | BYTE(0x75); BYTE(0x78); /* Partition name */ |
---|
39 | . = 0x400; |
---|
40 | *(.text) |
---|
41 | *(.text*) |
---|
42 | *(.sdata2) |
---|
43 | *(.sdata2*) |
---|
44 | *(.rodata) |
---|
45 | *(.rodata*) |
---|
46 | } |
---|
47 | /* . = ALIGN(16); */ |
---|
48 | .image : |
---|
49 | { |
---|
50 | rtems.gz(*) |
---|
51 | . = ALIGN(4); |
---|
52 | *.gz(*) |
---|
53 | } |
---|
54 | /* Read-write section, merged into data segment: */ |
---|
55 | /* . = ALIGN(4096); */ |
---|
56 | .reloc : |
---|
57 | { |
---|
58 | *(.got) |
---|
59 | _GOT2_TABLE_ = .; |
---|
60 | *(.got2) |
---|
61 | _FIXUP_TABLE_ = .; |
---|
62 | *(.fixup) |
---|
63 | _FIXUP_END_ = .; |
---|
64 | } |
---|
65 | |
---|
66 | .handlers : |
---|
67 | { |
---|
68 | *(.exception) |
---|
69 | } |
---|
70 | |
---|
71 | .data : |
---|
72 | { |
---|
73 | *(.data) |
---|
74 | *(.data*) |
---|
75 | *(.sdata) |
---|
76 | *(.sdata*) |
---|
77 | . = ALIGN(4); |
---|
78 | _data_end = .; |
---|
79 | } |
---|
80 | .bss : |
---|
81 | { |
---|
82 | *(.sbss) |
---|
83 | *(.sbss*) |
---|
84 | *(.bss) |
---|
85 | *(.bss*) |
---|
86 | *(COMMON) |
---|
87 | . = ALIGN(4); |
---|
88 | _bss_end = .; |
---|
89 | } |
---|
90 | .abs 0 : { |
---|
91 | __got2_entries = ABSOLUTE((_FIXUP_TABLE_ - _GOT2_TABLE_) >>2); |
---|
92 | __fixup_entries = ABSOLUTE((_FIXUP_END_ - _FIXUP_TABLE_)>>2); |
---|
93 | _edata = ABSOLUTE(_data_end); |
---|
94 | PROVIDE(_binary_initrd_gz_start = ABSOLUTE(0)); |
---|
95 | PROVIDE(_binary_initrd_gz_end = ABSOLUTE(0)); |
---|
96 | _rtems_gz_size = ABSOLUTE(_binary_rtems_gz_end - _binary_rtems_gz_start); |
---|
97 | _rtems_size = ABSOLUTE(__rtems_end - __rtems_start); |
---|
98 | __bss_words = ABSOLUTE(SIZEOF(.bss)>>2); |
---|
99 | __size = ABSOLUTE(_bss_end); |
---|
100 | } |
---|
101 | |
---|
102 | /DISCARD/ : |
---|
103 | { |
---|
104 | *(.comment*) |
---|
105 | *(.debug*) |
---|
106 | } |
---|
107 | } |
---|