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

Subversion Repositories c0or1k

[/] [c0or1k/] [trunk/] [include/] [l4/] [arch/] [arm/] [linker.lds] - 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
 
7
/* FIXME:
8
 * Currently we can't include cpp #defines in linker script.
9
 * Check that below offsets are coherent with offsets.h
10
 */
11
kernel_offset           = 0xF0000000;
12
kernel_physical         = 0x8000;
13
kernel_virtual          = kernel_physical + kernel_offset;
14
 
15
/* A temporary boot stack is used before a proper kernel stack is set up */
16
_bootstack_physical     = _bootstack - kernel_offset;
17
 
18
/* The symbols are linked at virtual addresses. So is _start.
19
 * We must set the entry point to a physical address, so that
20
 * when the image is loaded, it doesn't jump to a non existing
21
 * virtual address.
22
 */
23
ENTRY(kernel_physical)
24
 
25
SECTIONS
26
{
27
        . = kernel_virtual;
28
        _start_kernel = .;
29
        .text : AT (ADDR(.text) - kernel_offset)
30
        {
31
                _start_text = .;
32
                /* Make sure head.S comes first */
33
                /* *head.o(.text) This only works when given its full path. Bad limitation. */
34
                *(.text.head)
35
                *(.text)
36
                _end_text = .;
37
        }
38
        . = ALIGN(4);
39
        /* rodata is needed else your strings will link at physical! */
40
        .rodata : AT (ADDR(.rodata) - kernel_offset) { *(.rodata) }
41
        .rodata1 : AT (ADDR(.rodata1) - kernel_offset) { *(.rodata1) }
42
        .data : AT (ADDR(.data) - kernel_offset)
43
        {
44
                _start_data = .;
45
                *(.data)
46
                _start_vectors = .;
47
                *(.data.vectors)
48
                . = ALIGN(4K);
49
                _end_vectors = .;
50
                _start_kip = .;
51
                *(.data.kip)
52
                . = ALIGN(4K);
53
                _end_kip = .;
54
                _start_syscalls = .;
55
                *(.data.syscalls)
56
                . = ALIGN(4K);
57
                _end_syscalls = .;
58
                _end_data = .;
59
        }
60
        .bss : AT (ADDR(.bss) - kernel_offset)
61
        {
62
                *(.bss)
63
        }
64
        . = ALIGN(4K);
65
        . += 0x2000;            /* This is required as the link counter does not seem
66
                                 * to increment for the bss section
67
                                 * TODO: Change this with PAGE_SIZE */
68
 
69
        /* Below part is to be discarded after boot */
70
        _start_init = .;
71
        .init : AT (ADDR(.init) - kernel_offset)
72
        {
73
                . = ALIGN(16K); /* For initial pgd */
74
                *(.init.pgd)
75
                *(.init.bootmem)
76
                *(.init.data)
77
        }
78
        /* Space for boot stack */
79
        . += 0x1000;
80
        . = ALIGN(4K);  /* A page aligned stack of at least 4KB */
81
        _end_init = .;
82
        _bootstack = .;
83
        _end_kernel = .;
84
        _end = .;
85
}

powered by: WebSVN 2.1.0

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