* scripttempl/crisaout.sc (ENTRY): Now __start.
[deliverable/binutils-gdb.git] / ld / emulparams / criself.sh
1 # This is for embedded products (no MMU) with ELF.
2 MACHINE=
3 SCRIPT_NAME=elf
4 TEMPLATE_NAME=elf32
5
6 # Symbols have underscore prepended.
7 OUTPUT_FORMAT="elf32-us-cris"
8 ARCH=cris
9 MAXPAGESIZE=32
10 ENTRY=__start
11 EMBEDDED=yes
12 ALIGNMENT=32
13 TEXT_START_ADDR=0
14
15 # Put crt0 for flash/eprom etc. in this section.
16 INITIAL_READONLY_SECTIONS='.startup : { KEEP(*(.startup)) }'
17
18 # TEXT_START_SYMBOLS doesn't get what we want which is the start of
19 # all read-only sections; there's at least .init and .fini before it.
20 # We have to resort to trickery.
21 #
22 # The __start dance is to get us through assumptions about entry
23 # symbols, and to clear _start for normal use with sane programs.
24 EXECUTABLE_SYMBOLS='
25 PROVIDE (__Stext = .);
26 __start = DEFINED(__start) ? __start :
27 DEFINED(_start) ? _start :
28 DEFINED(start) ? start :
29 DEFINED(.startup) ? .startup + 2 : 2;
30 '
31
32 # Smuggle an "OTHER_TEXT_END_SYMBOLS" here.
33 OTHER_READONLY_SECTIONS='PROVIDE (__Etext = .);'
34 DATA_START_SYMBOLS='PROVIDE (__Sdata = .);'
35
36 # Smuggle an "OTHER_DATA_END_SYMBOLS" here.
37 OTHER_GOT_SECTIONS='PROVIDE (__Edata = .);'
38
39 # If .bss does not immediately follow .data but has its own start
40 # address, we can't get to it with OTHER_BSS_SYMBOLS, neither can we
41 # use ADDR(.bss) there. Instead, we use the symbol support for the
42 # end symbol.
43 OTHER_BSS_END_SYMBOLS='
44 PROVIDE (__Ebss = .);
45 PROVIDE (__end = .);
46 __Sbss = SIZEOF (.sbss) != 0 ? ADDR (.sbss) : ADDR (.bss);
47 PROVIDE (_bss_start = __Sbss);
48 '
49
50 INIT_START='
51 . = ALIGN(2);
52 ___init__start = .;
53 PROVIDE (___do_global_ctors = .);
54 SHORT (0xe1fc); /* push srp */
55 SHORT (0xbe7e);
56 '
57
58 INIT_END='
59 SHORT (0x0d3e); /* jump [sp+] */
60 PROVIDE (__init__end = .);
61 PROVIDE (___init__end = .);
62 '
63
64 FINI_START='
65 . = ALIGN (2);
66 ___fini__start = .;
67 PROVIDE (___do_global_dtors = .);
68 SHORT (0xe1fc); /* push srp */
69 SHORT (0xbe7e);
70 '
71
72 FINI_END='
73 SHORT (0x0d3e); /* jump [sp+] */
74 PROVIDE (__fini__end = .);
75 ___fini__end = .;
76 '
77
78 CTOR_START='
79 PROVIDE (___ctors = .);
80 ___elf_ctors_dtors_begin = .;
81 '
82
83 CTOR_END='
84 PROVIDE (___ctors_end = .);
85 '
86
87 DTOR_START='
88 PROVIDE (___dtors = .);
89 '
90
91 CTOR_END='
92 PROVIDE (___dtors_end = .);
93 ___elf_ctors_dtors_end = .;
94 '
95
96
97 # Smuggle an "OTHER_ALL_END_SYMBOLS" here.
98 # Also add the other symbols provided for rsim/xsim and elinux.
99 OTHER_RELOCATING_SECTIONS='
100 PROVIDE (__Eall = .);
101 PROVIDE (__Endmem = 0x10000000);
102 PROVIDE (__Stacksize = 0);
103 '
This page took 0.052493 seconds and 5 git commands to generate.