* Makefile.am (ALL_EMULATIONS): Add ecrisaout.o, ecriself.o,
[binutils.git] / ld / emulparams / criself.sh
blob44d0a111bc919fe46574146ce59a4e7872fdd9d1
1 # This is for embedded products (no MMU) with ELF.
2 MACHINE=
3 SCRIPT_NAME=elf
4 TEMPLATE_NAME=elf32
5 OUTPUT_FORMAT="elf32-cris"
6 ARCH=cris
7 MAXPAGESIZE=32
8 ENTRY=_start
9 EMBEDDED=yes
10 ALIGNMENT=32
11 TEXT_START_ADDR=0
13 # Put crt0 for flash/eprom etc. in this section.
14 INITIAL_READONLY_SECTIONS='.startup : { *(.startup) }'
16 # TEXT_START_SYMBOLS doesn't get what we want which is the start of
17 # all read-only sections; there's at least .init and .fini before it.
18 # We have to resort to trickery.
19 EXECUTABLE_SYMBOLS='PROVIDE (__Stext = .);'
21 # Smuggle an "OTHER_TEXT_END_SYMBOLS" here.
22 OTHER_READONLY_SECTIONS='PROVIDE (__Etext = .);'
23 DATA_START_SYMBOLS='PROVIDE (__Sdata = .);'
25 # Smuggle an "OTHER_DATA_END_SYMBOLS" here.
26 OTHER_GOT_SECTIONS='PROVIDE (__Edata = .);'
28 # If .bss does not immediately follow .data but has its own start
29 # address, we can't get to it with OTHER_BSS_SYMBOLS, neither can we
30 # use ADDR(.bss) there. Instead, we use the symbol support for the
31 # end symbol.
32 OTHER_BSS_END_SYMBOLS='
33 PROVIDE (__Ebss = .);
34 PROVIDE (__end = .);
35 __Sbss = SIZEOF (.sbss) != 0 ? ADDR (.sbss) : ADDR (.bss);
36 PROVIDE (_bss_start = __Sbss);
39 INIT_START='
40 . = ALIGN(2);
41 ___init__start = .;
42 PROVIDE (___do_global_ctors = .);
43 SHORT (0xe1fc); /* push srp */
44 SHORT (0xbe7e);
47 INIT_END='
48 SHORT (0x0d3e); /* jump [sp+] */
49 PROVIDE (__init__end = .);
50 PROVIDE (___init__end = .);
53 FINI_START='
54 . = ALIGN (2);
55 ___fini__start = .;
56 PROVIDE (___do_global_dtors = .);
57 SHORT (0xe1fc); /* push srp */
58 SHORT (0xbe7e);
61 FINI_END='
62 SHORT (0x0d3e); /* jump [sp+] */
63 PROVIDE (__fini__end = .);
64 ___fini__end = .;
67 CTOR_START='
68 PROVIDE (___ctors = .);
69 ___elf_ctors_dtors_begin = .;
72 CTOR_END='
73 PROVIDE (___ctors_end = .);
76 DTOR_START='
77 PROVIDE (___dtors = .);
80 CTOR_END='
81 PROVIDE (___dtors_end = .);
82 ___elf_ctors_dtors_end = .;
86 # Smuggle an "OTHER_ALL_END_SYMBOLS" here.
87 # Also add the other symbols provided for rsim/xsim and elinux.
88 OTHER_RELOCATING_SECTIONS='
89 PROVIDE (__Eall = .);
90 PROVIDE (__Endmem = 0x10000000);
91 PROVIDE (__Stacksize = 0);