OpenCores
URL https://opencores.org/ocsvn/c0or1k/c0or1k/trunk

Subversion Repositories c0or1k

[/] [c0or1k/] [trunk/] [include/] [l4/] [arch/] [arm/] [linker.lds.in] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 drasko
/*
2
 * Simple linker script
3
 *
4
 * Copyright (C) 2007 Bahadir Balban
5
 */
6
#if !defined (CONFIG_NCPU)
7
#define CONFIG_NCPU     1
8
#endif
9
 
10
phys_ram_start          = PLATFORM_PHYS_MEM_START;
11
 
12
#if !defined(kernel_offset)
13
kernel_offset           = KERNEL_AREA_START - phys_ram_start;
14
#endif
15
 
16
kernel_physical         = 0x8000 + phys_ram_start;
17
kernel_virtual          = kernel_physical + kernel_offset;
18
 
19
/* A temporary boot stack is used before a proper kernel stack is set up */
20
_bootstack_physical     = _end_bootstack - kernel_offset;
21
 
22
/* The symbols are linked at virtual addresses. So is _start.
23
 * We must set the entry point to a physical address, so that
24
 * when the image is loaded, it doesn't jump to a non existing
25
 * virtual address.
26
 */
27
ENTRY(kernel_physical)
28
 
29
SECTIONS
30
{
31
        . = kernel_virtual;
32
        _start_kernel = .;
33
        .text : AT (ADDR(.text) - kernel_offset)
34
        {
35
                _start_text = .;
36
                /* Make sure head.S comes first */
37
                /* *head.o(.text) This only works when given its full path. Bad limitation. */
38
                *(.text.head)
39
                *(.text)
40
                _end_text = .;
41
        }
42
        . = ALIGN(4);
43
        /* rodata is needed else your strings will link at physical! */
44
        .rodata : AT (ADDR(.rodata) - kernel_offset) { *(.rodata) }
45
        .rodata1 : AT (ADDR(.rodata1) - kernel_offset) { *(.rodata1) }
46
        .data : AT (ADDR(.data) - kernel_offset)
47
        {
48
                _start_data = .;
49
                *(.data)
50
                /* Best alignment because we need 4 x (4K) and 1 x 16K block */
51
                . = ALIGN(16K);
52
                _start_vectors = .;
53
                *(.data.vectors)
54
                . = ALIGN(4K);
55
                _end_vectors = .;
56
                _start_kip = .;
57
                *(.data.kip)
58
                . = ALIGN(4K);
59
                _end_kip = .;
60
                _start_syscalls = .;
61
                *(.data.syscalls)
62
                . = ALIGN(4K);
63
                _end_syscalls = .;
64
                _start_init_pgd = .;
65
                *(.data.pgd);
66
                _end_init_pgd = .;
67
                _start_bootstack = .;
68
                . = ALIGN(4K);
69
                . += PAGE_SIZE * CONFIG_NCPU;
70
                _end_bootstack = .;
71
                _end_data = .;
72
        }
73
        .bss : AT (ADDR(.bss) - kernel_offset)
74
        {
75
                *(.bss)
76
        }
77
        . = ALIGN(4K);
78
 
79
        /* Below part is to be discarded after boot */
80
        _start_init = .;
81
        .init : AT (ADDR(.init) - kernel_offset)
82
        {
83
                *(.init.task.pgd)       /* Non-global task table on split tables, otherwise nil */
84
                *(.init.bootmem)
85
                *(.init.data)
86
        }
87
        _end_init = .;
88
        _end_kernel = .;
89
        _end = .;
90
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.