source: mainline/kernel/arch/ia64/_link.ld.in@ cf3a905c

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since cf3a905c was cfdeedc, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 7 years ago

Keep kernel in ELF format

By keeping kernel in an ELF file (instead of converting it to
a flat binary), we can use the information it contains, like
symbol table and debug info.

We can also later implement more advanced functionality, like
loading kernel at multiple discontiguous blocks, or loading
a position-independent kernel at a randomized address.

Currently the functionality is quite restricted, to keep changes
to a minimum. Code in boot/generic/src/kernel.c validates that
the kernel image was built with the same addresses as the boot
loader uses, giving an extra level of sanity checking compared
to a flat binary.

  • Property mode set to 100644
File size: 795 bytes
Line 
1/** IA-64 linker script
2 *
3 * It is ELF format, but its only section looks like this:
4 * kernel text
5 * kernel data
6 *
7 */
8
9#define LOAD_ADDRESS_V 0xe000000004800000
10#define LOAD_ADDRESS_P 0x0000000004800000
11
12ENTRY(kernel_image_start)
13
14SECTIONS {
15 kernel_load_address = LOAD_ADDRESS_V;
16
17 .image (LOAD_ADDRESS_V + SIZEOF_HEADERS): AT (LOAD_ADDRESS_P + SIZEOF_HEADERS) {
18 . = ALIGN(16);
19 ktext_start = .;
20 *(K_TEXT_START);
21 *(.text .text.*)
22 ktext_end = .;
23
24 kdata_start = .;
25 *(K_DATA_START)
26 *(.rodata .rodata.*)
27 *(.opd)
28 *(.data .data.*)
29 __gp = .;
30 *(.got .got.*)
31 *(.sdata)
32 *(.sbss)
33 *(.scommon)
34 *(.bss)
35 *(COMMON);
36
37 . = ALIGN(8);
38 symbol_table = .;
39 *(symtab.*); /* Symbol table, must be LAST symbol!*/
40
41 kdata_end = .;
42 }
43
44 /DISCARD/ : {
45 *(*);
46 }
47}
Note: See TracBrowser for help on using the repository browser.