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