source: rtems/c/src/lib/libbsp/v850/gdbv850sim/startup/linkcmds @ a29aa21

5
Last change on this file since a29aa21 was a29aa21, checked in by Joel Sherrill <joel@…>, on 03/10/16 at 23:59:01

v850/gdbv850sim: Add per-section compilation and linking support

updates #2577.

Had to add .rtemsroset to the linkcmds following the arm to get it
to link after turning on the per-secton options.

For the v850e1sim BSP variant without this option sample executables
sizes were as follows:

text data bss dec hex filename

76940 6456 4944 88340 15914 ticker.exe
21896 1860 760 24516 5fc4 minimum.exe

802270 45832 12837 860939 d230b cxx_iostream.exe
473916 65152 18156 557224 880a8 fileio.exe
384288 45724 34148 464160 71520 pppd.exe
161648 18416 7840 187904 2de00 capture.exe

90856 6740 5021 102617 190d9 nsecs.exe

158424 17512 5508 181444 2c4c4 paranoia.exe
152938 12948 5821 171707 29ebb cdtest.exe

73808 6296 4912 85016 14c18 base_sp.exe
77420 6528 8756 92704 16a20 unlimited.exe
89692 4792 4916 99400 18448 hello.exe

236138 18396 12240 266774 41216 loopback.exe

For the v850e1sim BSP variant with this option sample executables
sizes were as follows:

text data bss dec hex filename

76739 1552 4920 83211 1450b ticker.exe
13682 228 748 14658 3942 minimum.exe

491284 6508 12026 509818 7c77a cxx_iostream.exe
517952 5632 17859 541443 84303 fileio.exe
379732 8864 33308 421904 67010 pppd.exe
169182 2176 7815 179173 2bbe5 capture.exe

91307 1640 4997 97944 17e98 nsecs.exe

167431 1920 5484 174835 2aaf3 paranoia.exe
156322 1936 5797 164055 280d7 cdtest.exe

72591 1548 4888 79027 134b3 base_sp.exe
76215 1576 8732 86523 151fb unlimited.exe
86346 1520 4892 92758 16a56 hello.exe

221810 2800 12076 236686 39c8e loopback.exe

For the v850e2sim BSP variant without this option sample executables
sizes were as follows:

text data bss dec hex filename

69788 6452 4948 81188 13d24 ticker.exe
20972 1856 788 23616 5c40 minimum.exe

795748 45828 12841 854417 d0991 cxx_iostream.exe
440586 64864 18160 523610 7fd5a fileio.exe
352650 45644 34152 432446 6993e pppd.exe
151172 18400 7844 177416 2b508 capture.exe

84028 6736 5025 95789 1762d nsecs.exe

148268 17500 5512 171280 29d10 paranoia.exe
145916 12936 5825 164677 28345 cdtest.exe

67124 6292 4916 78332 131fc base_sp.exe
70452 6508 8760 85720 14ed8 unlimited.exe
83800 4788 4920 93508 16d44 hello.exe

221216 18372 12244 251832 3d7b8 loopback.exe

For the v850e2sim BSP variant with this option sample executables
sizes were as follows:

text data bss dec hex filename

70155 1552 4924 76631 12b57 ticker.exe
14156 932 776 15864 3df8 minimum.exe

485650 6508 12030 504188 7b17c cxx_iostream.exe
485398 5632 17863 508893 7c3dd fileio.exe
351418 8864 33312 393594 6017a pppd.exe
159510 2176 7819 169505 29621 capture.exe

84989 1640 5001 91630 165ee nsecs.exe

157973 1920 5488 165381 28605 paranoia.exe
149880 1936 5801 157617 267b1 cdtest.exe

66529 1548 4892 72969 11d09 base_sp.exe
69847 1576 8736 80159 1391f unlimited.exe
81134 1520 4896 87550 155fe hello.exe

208878 2800 12080 223758 36a0e loopback.exe

For the v850e2v3sim BSP variant without this option sample
executables sizes were as follows:

text data bss dec hex filename

69784 6452 4948 81184 13d20 ticker.exe
20972 1856 788 23616 5c40 minimum.exe

791378 45808 12841 850027 cf86b cxx_iostream.exe
436576 64848 18160 519584 7eda0 fileio.exe
348982 45624 34152 428758 68ad6 pppd.exe
147420 18380 7844 173644 2a64c capture.exe

84020 6736 5025 95781 17625 nsecs.exe

148736 17480 5512 171728 29ed0 paranoia.exe
142216 12916 5825 160957 274bd cdtest.exe

67120 6292 4916 78328 131f8 base_sp.exe
70448 6508 8760 85716 14ed4 unlimited.exe
80048 4768 4920 89736 15e88 hello.exe

217432 18352 12244 248028 3c8dc loopback.exe

For the v850e2v3sim BSP variant with this option sample executables
sizes were as follows:

text data bss dec hex filename

70151 1552 4924 76627 12b53 ticker.exe
14156 932 776 15864 3df8 minimum.exe

481408 6508 12030 499946 7a0ea cxx_iostream.exe
481378 5632 17863 504873 7b429 fileio.exe
347740 8864 33312 389916 5f31c pppd.exe
155736 2176 7819 165731 28763 capture.exe

84981 1640 5001 91622 165e6 nsecs.exe

158331 1920 5488 165739 2876b paranoia.exe
146164 1936 5801 153901 2592d cdtest.exe

66525 1548 4892 72965 11d05 base_sp.exe
69843 1576 8736 80155 1391b unlimited.exe
77363 1520 4896 83779 14743 hello.exe

205082 2800 12080 219962 35b3a loopback.exe

For the v850esim BSP variant without this option sample executables
sizes were as follows:

text data bss dec hex filename

69626 6452 4948 81026 13c82 ticker.exe
20920 1856 788 23564 5c0c minimum.exe

794782 45828 12841 853451 d05cb cxx_iostream.exe
440110 64860 18160 523130 7fb7a fileio.exe
351798 45644 34152 431594 695ea pppd.exe
150816 18400 7844 177060 2b3a4 capture.exe

83850 6736 5025 95611 1757b nsecs.exe

147962 17500 5512 170974 29bde paranoia.exe
145458 12936 5825 164219 2817b cdtest.exe

66958 6292 4916 78166 13156 base_sp.exe
70286 6508 8760 85554 14e32 unlimited.exe
83606 4788 4920 93314 16c82 hello.exe

220770 18372 12244 251386 3d5fa loopback.exe

For the v850esim BSP variant with this option sample executables
sizes were as follows:

text data bss dec hex filename

69971 1552 4924 76447 12a9f ticker.exe
14108 932 776 15816 3dc8 minimum.exe

484692 6508 12030 503230 7adbe cxx_iostream.exe
484894 5632 17863 508389 7c1e5 fileio.exe
350548 8864 33312 392724 5fe14 pppd.exe
159138 2176 7819 169133 294ad capture.exe

84791 1640 5001 91432 16528 nsecs.exe

157655 1920 5488 165063 284c7 paranoia.exe
149416 1936 5801 157153 265e1 cdtest.exe

66349 1548 4892 72789 11c55 base_sp.exe
69669 1576 8736 79981 1386d unlimited.exe
80928 1520 4896 87344 15530 hello.exe

208424 2800 12080 223304 36848 loopback.exe

For the v850essim BSP variant without this option sample executables
sizes were as follows:

text data bss dec hex filename

76940 6456 4944 88340 15914 ticker.exe
21896 1860 760 24516 5fc4 minimum.exe

802270 45832 12837 860939 d230b cxx_iostream.exe
473916 65152 18156 557224 880a8 fileio.exe
384288 45724 34148 464160 71520 pppd.exe
161648 18416 7840 187904 2de00 capture.exe

90856 6740 5021 102617 190d9 nsecs.exe

158424 17512 5508 181444 2c4c4 paranoia.exe
152938 12948 5821 171707 29ebb cdtest.exe

73808 6296 4912 85016 14c18 base_sp.exe
77420 6528 8756 92704 16a20 unlimited.exe
89692 4792 4916 99400 18448 hello.exe

236138 18396 12240 266774 41216 loopback.exe

For the v850essim BSP variant with this option sample executables
sizes were as follows:

text data bss dec hex filename

76739 1552 4920 83211 1450b ticker.exe
13682 228 748 14658 3942 minimum.exe

491284 6508 12026 509818 7c77a cxx_iostream.exe
517952 5632 17859 541443 84303 fileio.exe
379732 8864 33308 421904 67010 pppd.exe
169182 2176 7815 179173 2bbe5 capture.exe

91307 1640 4997 97944 17e98 nsecs.exe

167431 1920 5484 174835 2aaf3 paranoia.exe
156322 1936 5797 164055 280d7 cdtest.exe

72591 1548 4888 79027 134b3 base_sp.exe
76215 1576 8732 86523 151fb unlimited.exe
86346 1520 4892 92758 16a56 hello.exe

221810 2800 12076 236686 39c8e loopback.exe

For the v850sim BSP variant without this option sample executables
sizes were as follows:

text data bss dec hex filename

79246 6456 4944 90646 16216 ticker.exe
22440 1860 760 25060 61e4 minimum.exe

874792 46172 12837 933801 e3fa9 cxx_iostream.exe
484218 65164 18156 567538 8a8f2 fileio.exe
396364 45736 34148 476248 74458 pppd.exe
167214 18416 7840 193470 2f3be capture.exe

95154 6744 5021 106919 1a1a7 nsecs.exe

162778 17512 5508 185798 2d5c6 paranoia.exe
161270 12984 5821 180075 2bf6b cdtest.exe

76114 6296 4912 87322 1551a base_sp.exe
79726 6528 8756 95010 17322 unlimited.exe
93578 4792 4916 103286 19376 hello.exe

242848 18396 12240 273484 42c4c loopback.exe

For the v850sim BSP variant with this option sample executables
sizes were as follows:

text data bss dec hex filename

79045 1552 4920 85517 14e0d ticker.exe
13674 228 748 14650 393a minimum.exe

526914 6508 12026 545448 852a8 cxx_iostream.exe
528264 5632 17859 551755 86b4b fileio.exe
391652 8864 33308 433824 69ea0 pppd.exe
174748 2176 7815 184739 2d1a3 capture.exe

95605 1640 4997 102242 18f62 nsecs.exe

171785 1920 5484 179189 2bbf5 paranoia.exe
164414 1936 5797 172147 2a073 cdtest.exe

74897 1548 4888 81333 13db5 base_sp.exe
78521 1576 8732 88829 15afd unlimited.exe
90232 1520 4892 96644 17984 hello.exe

228424 2800 12076 243300 3b664 loopback.exe

  • Property mode set to 100644
File size: 6.6 KB
Line 
1/*
2 * Declare some sizes.
3 */
4_RamBase = DEFINED(_RamBase) ? _RamBase : 0x100000; /* RAM starts at 1MB */
5_RamSize = DEFINED(_RamSize) ? _RamSize : 0x100000; /* default is 1MB */
6_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x0;
7_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
8
9/* Default linker script, for normal executables */
10OUTPUT_FORMAT("elf32-v850-rh850", "elf32-v850-rh850",
11              "elf32-v850-rh850")
12OUTPUT_ARCH(v850-rh850)
13ENTRY(_start)
14/* GROUP(-lc -lsim -lgcc) */
15SEARCH_DIR(.);
16EXTERN(__ctbp __ep __gp);
17SECTIONS
18{
19  /* This saves a little space in the ELF file, since the zda starts
20     at a higher location that the ELF headers take up.  */
21  .zdata 0x160 :
22  {
23        *(.zdata)
24        *(.zbss)
25        *(reszdata)
26        *(.zcommon)
27  }
28  /* This is the read only part of the zero data area.
29     Having it as a seperate section prevents its
30     attributes from being inherited by the zdata
31     section.  Specifically it prevents the zdata
32     section from being marked READONLY.  */
33  .rozdata ALIGN (4) :
34  {
35        *(.rozdata)
36        *(romzdata)
37        *(romzbss)
38  }
39  /* Read-only sections, merged into text segment.  */
40  . = 0x100000;
41  .interp       : { *(.interp) }
42  .hash         : { *(.hash) }
43  .dynsym       : { *(.dynsym) }
44  .dynstr       : { *(.dynstr) }
45  .rel.text     : { *(.rel.text) }
46  .rela.text    : { *(.rela.text) }
47  .rel.data     : { *(.rel.data) }
48  .rela.data    : { *(.rela.data) }
49  .rel.rodata   : { *(.rel.rodata) }
50  .rela.rodata  : { *(.rela.rodata) }
51  .rel.gcc_except_table : { *(.rel.gcc_except_table) }
52  .rela.gcc_except_table : { *(.rela.gcc_except_table) }
53  .rel.got      : { *(.rel.got) }
54  .rela.got     : { *(.rela.got) }
55  .rel.ctors    : { *(.rel.ctors) }
56  .rela.ctors   : { *(.rela.ctors) }
57  .rel.dtors    : { *(.rel.dtors) }
58  .rela.dtors   : { *(.rela.dtors) }
59  .rel.init     : { *(.rel.init) }
60  .rela.init    : { *(.rela.init) }
61  .rel.fini     : { *(.rel.fini) }
62  .rela.fini    : { *(.rela.fini) }
63  .rel.bss      : { *(.rel.bss) }
64  .rela.bss     : { *(.rela.bss) }
65  .rel.plt      : { *(.rel.plt) }
66  .rela.plt     : { *(.rela.plt) }
67  .init         : { KEEP (*(.init)) } =0
68  .plt          : { *(.plt) }
69  .text         :
70  {
71    *(.text)
72    *(.text.*)
73    /* .gnu.warning sections are handled specially by elf32.em.  */
74    *(.gnu.warning)
75    *(.gnu.linkonce.t*)
76  } =0
77  _etext = .;
78  PROVIDE (etext = .);
79   /* This is special code area at the end of the normal text section.
80      It contains a small lookup table at the start followed by the
81      code pointed to by entries in the lookup table.  */
82  .call_table_data ALIGN (4) :
83  {
84    PROVIDE(__ctbp = .);
85    *(.call_table_data)
86  } = 0xff   /* Fill gaps with 0xff.  */
87  .call_table_text :
88  {
89    *(.call_table_text)
90  }
91  .fini         : { KEEP (*(.fini)) } =0
92  .rodata       : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
93  .rodata1      : { *(.rodata1) }
94  .rtemsroset : {
95    /* for pre rtems-libbsd FreeBSD code */
96    ___start_set_sysctl_set = .;
97    *(set_sysctl_*);
98    ___stop_set_sysctl_set = .;
99    *(set_domain_*);
100    *(set_pseudo_*);
101
102    KEEP (*(SORT(.rtemsroset.*)))
103  } =0xff
104  .tdata : {
105    __TLS_Data_begin = .;
106    *(.tdata .tdata.* .gnu.linkonce.td.*)
107    __TLS_Data_end = .;
108  }
109  .tbss : {
110    __TLS_BSS_begin = .;
111    *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
112    __TLS_BSS_end = .;
113  }
114  __TLS_Data_size = __TLS_Data_end - __TLS_Data_begin;
115  __TLS_Data_begin = __TLS_Data_size != 0 ? __TLS_Data_begin : __TLS_BSS_begin;
116  __TLS_Data_end = __TLS_Data_size != 0 ? __TLS_Data_end : __TLS_BSS_begin;
117  __TLS_BSS_size = __TLS_BSS_end - __TLS_BSS_begin;
118  __TLS_Size = __TLS_BSS_end - __TLS_Data_begin;
119  __TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
120  .data         :
121  {
122    *(.data)
123    *(.data.*)
124    KEEP (*(SORT(.rtemsrwset.*)))
125    *(.gnu.linkonce.d*)
126    CONSTRUCTORS
127  }
128  .data1        : { *(.data1) }
129  .ctors        :
130  {
131    ___ctors = .;
132    KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
133    KEEP (*(SORT(.ctors.*)))
134    KEEP (*crtend(.ctors))
135    ___ctors_end = .;
136  }
137  .dtors        :
138  {
139    ___dtors = .;
140    KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
141    KEEP (*(SORT(.dtors.*)))
142    KEEP (*crtend.o(.dtors))
143    ___dtors_end = .;
144  }
145  .jcr          :
146  {
147    KEEP (*(.jcr))
148  }
149  .gcc_except_table : { *(.gcc_except_table) }
150  .got          : { *(.got.plt) *(.got) }
151  .dynamic      : { *(.dynamic) }
152  .tdata ALIGN (4) :
153  {
154        PROVIDE (__ep = .);
155        *(.tbyte)
156        *(.tcommon_byte)
157        *(.tdata)
158        *(.tbss)
159        *(.tcommon)
160  }
161  /* We want the small data sections together, so single-instruction offsets
162     can access them all, and initialized data all before uninitialized, so
163     we can shorten the on-disk segment size.  */
164  .sdata ALIGN (4) :
165  {
166        PROVIDE (__gp = . + 0x8000);
167        *(.sdata)
168   }
169  /* See comment about .rozdata. */
170  .rosdata ALIGN (4) :
171  {
172        *(.rosdata)
173  }
174  /* We place the .sbss data section AFTER the .rosdata section, so that
175     it can directly preceed the .bss section.  This allows runtime startup
176     code to initialise all the zero-data sections by simply taking the
177     value of '_edata' and zeroing until it reaches '_end'.  */
178  .sbss :
179  {
180        __sbss_start = .;
181        *(.sbss)
182        *(.scommon)
183  }
184  _edata  = DEFINED (__sbss_start) ? __sbss_start : . ;
185  PROVIDE (edata = _edata);
186  .bss       :
187  {
188        __bss_start = DEFINED (__sbss_start) ? __sbss_start : . ;
189        __real_bss_start = . ;
190        *(.dynbss)
191        *(.bss)
192        *(COMMON)
193  }
194  . += _StackSize;
195  _stack = .;
196  _WorkAreaBase = .;
197  _end = . ;
198  PROVIDE (end = .);
199  /* Stabs debugging sections.  */
200  .stab 0               : { *(.stab) }
201  .stabstr 0            : { *(.stabstr) }
202  .stab.excl 0          : { *(.stab.excl) }
203  .stab.exclstr 0       : { *(.stab.exclstr) }
204  .stab.index 0         : { *(.stab.index) }
205  .stab.indexstr 0      : { *(.stab.indexstr) }
206  .comment 0            : { *(.comment) }
207  /* DWARF debug sections.
208     Symbols in the DWARF debugging sections are relative to the beginning
209     of the section so we begin them at 0.  */
210  /* DWARF 1 */
211  .debug          0     : { *(.debug) }
212  .line           0     : { *(.line) }
213  /* GNU DWARF 1 extensions */
214  .debug_srcinfo  0     : { *(.debug_srcinfo) }
215  .debug_sfnames  0     : { *(.debug_sfnames) }
216  /* DWARF 1.1 and DWARF 2 */
217  .debug_aranges  0     : { *(.debug_aranges) }
218  .debug_pubnames 0     : { *(.debug_pubnames) }
219  /* DWARF 2 */
220  .debug_info     0     : { *(.debug_info) *(.gnu.linkonce.wi.*) }
221  .debug_abbrev   0     : { *(.debug_abbrev) }
222  .debug_line     0     : { *(.debug_line) }
223  .debug_frame    0     : { *(.debug_frame) }
224  .debug_str      0     : { *(.debug_str) }
225  .debug_loc      0     : { *(.debug_loc) }
226  .debug_macinfo  0     : { *(.debug_macinfo) }
227  /* SGI/MIPS DWARF 2 extensions.  */
228  .debug_weaknames 0    : { *(.debug_weaknames) }
229  .debug_funcnames 0    : { *(.debug_funcnames) }
230  .debug_typenames 0    : { *(.debug_typenames) }
231  .debug_varnames  0    : { *(.debug_varnames) }
232  /* libgloss - User stack.  */
233/*
234  .stack 0x200000       :
235  {
236        __stack = .;
237        *(.stack)
238  }
239*/
240}
241
Note: See TracBrowser for help on using the repository browser.