[ipc/ipcdev.git] / qnx / src / ipc3x_dev / ti / syslink / procMgr / hlos / knl / loaders / Elf / Qnx / DLOAD / DLOAD / elf32.c
1 /*
2 * elf32.c
3 *
4 * Basic Data Structures for 32-Bit ELF Object Format Files
5 *
6 * The data structures in this file come primarily from this specification:
7 *
8 * Tool Interface Standard (TIS)
9 * Executable and Linking Format (ELF) Specification
10 * Version 1.2
11 *
12 * TIS Committee
13 * May 1995
14 *
15 * Additions and enhancements from this specification are also included:
16 *
17 * System V Application Binary Interface
18 * DRAFT 17
19 * December 2003
20 *
21 * http://sco.com/developers/gabi/2003-12-17/contents.html
22 *
23 * This is a C implementation of the data base objects that are commonly
24 * used in the source for TI development tools that support ELF.
25 *
26 * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/
27 *
28 *
29 * Redistribution and use in source and binary forms, with or without
30 * modification, are permitted provided that the following conditions
31 * are met:
32 *
33 * Redistributions of source code must retain the above copyright
34 * notice, this list of conditions and the following disclaimer.
35 *
36 * Redistributions in binary form must reproduce the above copyright
37 * notice, this list of conditions and the following disclaimer in the
38 * documentation and/or other materials provided with the
39 * distribution.
40 *
41 * Neither the name of Texas Instruments Incorporated nor the names of
42 * its contributors may be used to endorse or promote products derived
43 * from this software without specific prior written permission.
44 *
45 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
46 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
47 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
48 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
49 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
50 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
51 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
52 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
53 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
54 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
55 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
56 *
57 */
59 #include "elf32.h"
61 /*---------------------------------------------------------------------------*/
62 /* Dynamic Tag Database */
63 /*---------------------------------------------------------------------------*/
65 const struct EDYN_TAG EDYN_TAG_DB[] =
66 {
67 /* EDYN_TAG_NULL */
68 {
69 /* d_tag_name */ "DT_NULL",
70 /* d_tag_value */ DT_NULL,
71 /* d_untype */ EDYN_UNTYPE_IGNORED,
72 /* d_exec_req */ EDYN_TAGREQ_MANDATORY,
73 /* d_shared_req */ EDYN_TAGREQ_MANDATORY
74 },
76 /* EDYN_TAG_NEEDED */
77 {
78 /* d_tag_name */ "DT_NEEDED",
79 /* d_tag_value */ DT_NEEDED,
80 /* d_untype */ EDYN_UNTYPE_VAL,
81 /* d_exec_req */ EDYN_TAGREQ_OPTIONAL,
82 /* d_shared_req */ EDYN_TAGREQ_OPTIONAL
83 },
85 /* EDYN_TAG_PLTRELSZ */
86 {
87 /* d_tag_name */ "DT_PLTRELSZ",
88 /* d_tag_value */ DT_PLTRELSZ,
89 /* d_untype */ EDYN_UNTYPE_VAL,
90 /* d_exec_req */ EDYN_TAGREQ_OPTIONAL,
91 /* d_shared_req */ EDYN_TAGREQ_OPTIONAL
92 },
94 /* EDYN_TAG_PLTGOT */
95 {
96 /* d_tag_name */ "DT_PLTGOT",
97 /* d_tag_value */ DT_PLTGOT,
98 /* d_untype */ EDYN_UNTYPE_PTR,
99 /* d_exec_req */ EDYN_TAGREQ_OPTIONAL,
100 /* d_shared_req */ EDYN_TAGREQ_OPTIONAL
101 },
103 /* EDYN_TAG_HASH */
104 {
105 /* d_tag_name */ "DT_HASH",
106 /* d_tag_value */ DT_HASH,
107 /* d_untype */ EDYN_UNTYPE_PTR,
108 /* d_exec_req */ EDYN_TAGREQ_MANDATORY,
109 /* d_shared_req */ EDYN_TAGREQ_MANDATORY
110 },
112 /* EDYN_TAG_STRTAB */
113 {
114 /* d_tag_name */ "DT_STRTAB",
115 /* d_tag_value */ DT_STRTAB,
116 /* d_untype */ EDYN_UNTYPE_PTR,
117 /* d_exec_req */ EDYN_TAGREQ_MANDATORY,
118 /* d_shared_req */ EDYN_TAGREQ_MANDATORY
119 },
121 /* EDYN_TAG_SYMTAB */
122 {
123 /* d_tag_name */ "DT_SYMTAB",
124 /* d_tag_value */ DT_SYMTAB,
125 /* d_untype */ EDYN_UNTYPE_PTR,
126 /* d_exec_req */ EDYN_TAGREQ_MANDATORY,
127 /* d_shared_req */ EDYN_TAGREQ_MANDATORY
128 },
130 /* EDYN_TAG_RELA */
131 {
132 /* d_tag_name */ "DT_RELA",
133 /* d_tag_value */ DT_RELA,
134 /* d_untype */ EDYN_UNTYPE_PTR,
135 /* d_exec_req */ EDYN_TAGREQ_MANDATORY,
136 /* d_shared_req */ EDYN_TAGREQ_OPTIONAL
137 },
139 /* EDYN_TAG_RELASZ */
140 {
141 /* d_tag_name */ "DT_RELASZ",
142 /* d_tag_value */ DT_RELASZ,
143 /* d_untype */ EDYN_UNTYPE_VAL,
144 /* d_exec_req */ EDYN_TAGREQ_MANDATORY,
145 /* d_shared_req */ EDYN_TAGREQ_OPTIONAL
146 },
148 /* EDYN_TAG_RELAENT */
149 {
150 /* d_tag_name */ "DT_RELAENT",
151 /* d_tag_value */ DT_RELAENT,
152 /* d_untype */ EDYN_UNTYPE_VAL,
153 /* d_exec_req */ EDYN_TAGREQ_MANDATORY,
154 /* d_shared_req */ EDYN_TAGREQ_OPTIONAL
155 },
157 /* EDYN_TAG_STRSZ */
158 {
159 /* d_tag_name */ "DT_STRSZ",
160 /* d_tag_value */ DT_STRSZ,
161 /* d_untype */ EDYN_UNTYPE_VAL,
162 /* d_exec_req */ EDYN_TAGREQ_MANDATORY,
163 /* d_shared_req */ EDYN_TAGREQ_MANDATORY
164 },
166 /* EDYN_TAG_SYMENT */
167 {
168 /* d_tag_name */ "DT_SYMENT",
169 /* d_tag_value */ DT_SYMENT,
170 /* d_untype */ EDYN_UNTYPE_VAL,
171 /* d_exec_req */ EDYN_TAGREQ_MANDATORY,
172 /* d_shared_req */ EDYN_TAGREQ_MANDATORY
173 },
175 /* EDYN_TAG_INIT */
176 {
177 /* d_tag_name */ "DT_INIT",
178 /* d_tag_value */ DT_INIT,
179 /* d_untype */ EDYN_UNTYPE_PTR,
180 /* d_exec_req */ EDYN_TAGREQ_OPTIONAL,
181 /* d_shared_req */ EDYN_TAGREQ_OPTIONAL
182 },
184 /* EDYN_TAG_FINI */
185 {
186 /* d_tag_name */ "DT_FINI",
187 /* d_tag_value */ DT_FINI,
188 /* d_untype */ EDYN_UNTYPE_PTR,
189 /* d_exec_req */ EDYN_TAGREQ_OPTIONAL,
190 /* d_shared_req */ EDYN_TAGREQ_OPTIONAL
191 },
193 /* EDYN_TAG_SONAME */
194 {
195 /* d_tag_name */ "DT_SONAME",
196 /* d_tag_value */ DT_SONAME,
197 /* d_untype */ EDYN_UNTYPE_VAL,
198 /* d_exec_req */ EDYN_TAGREQ_IGNORED,
199 /* d_shared_req */ EDYN_TAGREQ_OPTIONAL
200 },
202 /* EDYN_TAG_RPATH */
203 {
204 /* d_tag_name */ "DT_RPATH",
205 /* d_tag_value */ DT_RPATH,
206 /* d_untype */ EDYN_UNTYPE_VAL,
207 /* d_exec_req */ EDYN_TAGREQ_OPTIONAL,
208 /* d_shared_req */ EDYN_TAGREQ_IGNORED
209 },
211 /* EDYN_TAG_SYMBOLIC */
212 {
213 /* d_tag_name */ "DT_SYMBOLIC",
214 /* d_tag_value */ DT_SYMBOLIC,
215 /* d_untype */ EDYN_UNTYPE_IGNORED,
216 /* d_exec_req */ EDYN_TAGREQ_IGNORED,
217 /* d_shared_req */ EDYN_TAGREQ_OPTIONAL
218 },
220 /* EDYN_TAG_REL */
221 {
222 /* d_tag_name */ "DT_REL",
223 /* d_tag_value */ DT_REL,
224 /* d_untype */ EDYN_UNTYPE_PTR,
225 /* d_exec_req */ EDYN_TAGREQ_MANDATORY,
226 /* d_shared_req */ EDYN_TAGREQ_OPTIONAL
227 },
229 /* EDYN_TAG_RELSZ */
230 {
231 /* d_tag_name */ "DT_RELSZ",
232 /* d_tag_value */ DT_RELSZ,
233 /* d_untype */ EDYN_UNTYPE_VAL,
234 /* d_exec_req */ EDYN_TAGREQ_MANDATORY,
235 /* d_shared_req */ EDYN_TAGREQ_OPTIONAL
236 },
238 /* EDYN_TAG_RELENT */
239 {
240 /* d_tag_name */ "DT_RELENT",
241 /* d_tag_value */ DT_RELENT,
242 /* d_untype */ EDYN_UNTYPE_VAL,
243 /* d_exec_req */ EDYN_TAGREQ_MANDATORY,
244 /* d_shared_req */ EDYN_TAGREQ_OPTIONAL
245 },
247 /* EDYN_TAG_PLTREL */
248 {
249 /* d_tag_name */ "DT_PLTREL",
250 /* d_tag_value */ DT_PLTREL,
251 /* d_untype */ EDYN_UNTYPE_VAL,
252 /* d_exec_req */ EDYN_TAGREQ_OPTIONAL,
253 /* d_shared_req */ EDYN_TAGREQ_OPTIONAL
254 },
256 /* EDYN_TAG_DEBUG */
257 {
258 /* d_tag_name */ "DT_DEBUG",
259 /* d_tag_value */ DT_DEBUG,
260 /* d_untype */ EDYN_UNTYPE_PTR,
261 /* d_exec_req */ EDYN_TAGREQ_OPTIONAL,
262 /* d_shared_req */ EDYN_TAGREQ_IGNORED
263 },
265 /* EDYN_TAG_TEXTREL */
266 {
267 /* d_tag_name */ "DT_TEXTREL",
268 /* d_tag_value */ DT_TEXTREL,
269 /* d_untype */ EDYN_UNTYPE_IGNORED,
270 /* d_exec_req */ EDYN_TAGREQ_OPTIONAL,
271 /* d_shared_req */ EDYN_TAGREQ_OPTIONAL
272 },
274 /* EDYN_TAG_JMPREL */
275 {
276 /* d_tag_name */ "DT_JMPREL",
277 /* d_tag_value */ DT_JMPREL,
278 /* d_untype */ EDYN_UNTYPE_PTR,
279 /* d_exec_req */ EDYN_TAGREQ_OPTIONAL,
280 /* d_shared_req */ EDYN_TAGREQ_OPTIONAL
281 },
283 /* EDYN_TAG_BIND_NOW */
284 {
285 /* d_tag_name */ "DT_BIND_NOW",
286 /* d_tag_value */ DT_BIND_NOW,
287 /* d_untype */ EDYN_UNTYPE_IGNORED,
288 /* d_exec_req */ EDYN_TAGREQ_OPTIONAL,
289 /* d_shared_req */ EDYN_TAGREQ_OPTIONAL
290 },
292 /* EDYN_TAG_INIT_ARRAY */
293 {
294 /* d_tag_name */ "DT_INIT_ARRAY",
295 /* d_tag_value */ DT_INIT_ARRAY,
296 /* d_untype */ EDYN_UNTYPE_PTR,
297 /* d_exec_req */ EDYN_TAGREQ_OPTIONAL,
298 /* d_shared_req */ EDYN_TAGREQ_OPTIONAL
299 },
301 /* EDYN_TAG_FINI_ARRAY */
302 {
303 /* d_tag_name */ "DT_FINI_ARRAY",
304 /* d_tag_value */ DT_FINI_ARRAY,
305 /* d_untype */ EDYN_UNTYPE_PTR,
306 /* d_exec_req */ EDYN_TAGREQ_OPTIONAL,
307 /* d_shared_req */ EDYN_TAGREQ_OPTIONAL
308 },
310 /* EDYN_TAG_INIT_ARRAYSZ */
311 {
312 /* d_tag_name */ "DT_INIT_ARRAYSZ",
313 /* d_tag_value */ DT_INIT_ARRAYSZ,
314 /* d_untype */ EDYN_UNTYPE_VAL,
315 /* d_exec_req */ EDYN_TAGREQ_OPTIONAL,
316 /* d_shared_req */ EDYN_TAGREQ_OPTIONAL
317 },
319 /* EDYN_TAG_FINI_ARRAYSZ */
320 {
321 /* d_tag_name */ "DT_FINI_ARRAYSZ",
322 /* d_tag_value */ DT_FINI_ARRAYSZ,
323 /* d_untype */ EDYN_UNTYPE_VAL,
324 /* d_exec_req */ EDYN_TAGREQ_OPTIONAL,
325 /* d_shared_req */ EDYN_TAGREQ_OPTIONAL
326 },
328 /* EDYN_TAG_RUNPATH */
329 {
330 /* d_tag_name */ "DT_RUNPATH",
331 /* d_tag_value */ DT_RUNPATH,
332 /* d_untype */ EDYN_UNTYPE_VAL,
333 /* d_exec_req */ EDYN_TAGREQ_OPTIONAL,
334 /* d_shared_req */ EDYN_TAGREQ_OPTIONAL
335 },
337 /* EDYN_TAG_FLAGS */
338 {
339 /* d_tag_name */ "DT_FLAGS",
340 /* d_tag_value */ DT_FLAGS,
341 /* d_untype */ EDYN_UNTYPE_VAL,
342 /* d_exec_req */ EDYN_TAGREQ_OPTIONAL,
343 /* d_shared_req */ EDYN_TAGREQ_OPTIONAL
344 },
346 /* EDYN_TAG_ENCODING */
347 {
348 /* d_tag_name */ "DT_ENCODING",
349 /* d_tag_value */ DT_ENCODING,
350 /* d_untype */ EDYN_UNTYPE_UNSPECIFIED,
351 /* d_exec_req */ EDYN_TAGREQ_UNSPECIFIED,
352 /* d_shared_req */ EDYN_TAGREQ_UNSPECIFIED
353 },
355 /* EDYN_TAG_PREINIT_ARRAY */
356 {
357 /* d_tag_name */ "DT_PREINIT_ARRAY",
358 /* d_tag_value */ DT_PREINIT_ARRAY,
359 /* d_untype */ EDYN_UNTYPE_PTR,
360 /* d_exec_req */ EDYN_TAGREQ_OPTIONAL,
361 /* d_shared_req */ EDYN_TAGREQ_IGNORED
362 },
364 /* EDYN_TAG_PREINIT_ARRAYSZ */
365 {
366 /* d_tag_name */ "DT_PREINIT_ARRAYSZ",
367 /* d_tag_value */ DT_PREINIT_ARRAYSZ,
368 /* d_untype */ EDYN_UNTYPE_VAL,
369 /* d_exec_req */ EDYN_TAGREQ_OPTIONAL,
370 /* d_shared_req */ EDYN_TAGREQ_IGNORED
371 },
373 /* Terminate array with an id of -1 */
374 {
375 /* d_tag_name */ "",
376 /* d_tag_value */ -1,
377 /* d_untype */ EDYN_UNTYPE_UNSPECIFIED,
378 /* d_exec_req */ EDYN_TAGREQ_OPTIONAL,
379 /* d_shared_req */ EDYN_TAGREQ_IGNORED
380 }
381 };
383 /*---------------------------------------------------------------------------*/
384 /* Special Section Database */
385 /*---------------------------------------------------------------------------*/
386 const struct ESCN ESCN_DB[] =
387 {
388 /* .bss */
389 {
390 /* name */ ESCN_BSS_name,
391 /* sh_type */ SHT_NOBITS,
392 /* sh_entsize */ 0,
393 /* sh_flags */ SHF_ALLOC + SHF_WRITE
394 },
396 /* .comment */
397 {
398 /* name */ ESCN_COMMENT_name,
399 /* sh_type */ SHT_PROGBITS,
400 /* sh_entsize */ 0,
401 /* sh_flags */ 0
402 },
404 /* .data */
405 {
406 /* name */ ESCN_DATA_name,
407 /* sh_type */ SHT_PROGBITS,
408 /* sh_entsize */ 0,
409 /* sh_flags */ SHF_ALLOC + SHF_WRITE
410 },
412 /* .data1 */
413 {
414 /* name */ ESCN_DATA1_name,
415 /* sh_type */ SHT_PROGBITS,
416 /* sh_entsize */ 0,
417 /* sh_flags */ SHF_ALLOC + SHF_WRITE
418 },
420 /* .debug */
421 {
422 /* name */ ESCN_DEBUG_name,
423 /* sh_type */ SHT_PROGBITS,
424 /* sh_entsize */ 0,
425 /* sh_flags */ 0
426 },
428 /* .dynamic */
429 {
430 /* name */ ESCN_DYNAMIC_name,
431 /* sh_type */ SHT_DYNAMIC,
432 /* sh_entsize */ sizeof(struct Elf32_Dyn),
433 /* sh_flags */ SHF_ALLOC
434 },
436 /* .dynstr */
437 {
438 /* name */ ESCN_DYNSTR_name,
439 /* sh_type */ SHT_STRTAB,
440 /* sh_entsize */ sizeof(char),
441 /* sh_flags */ SHF_ALLOC + SHF_STRINGS
442 },
444 /* .dynsym */
445 {
446 /* name */ ESCN_DYNSYM_name,
447 /* sh_type */ SHT_DYNSYM,
448 /* sh_entsize */ sizeof(struct Elf32_Sym),
449 /* sh_flags */ SHF_ALLOC
450 },
452 /* .fini */
453 {
454 /* name */ ESCN_FINI_name,
455 /* sh_type */ SHT_PROGBITS,
456 /* sh_entsize */ 0,
457 /* sh_flags */ SHF_ALLOC + SHF_EXECINSTR
458 },
460 /* .fini_array */
461 {
462 /* name */ ESCN_FINI_ARRAY_name,
463 /* sh_type */ SHT_FINI_ARRAY,
464 /* sh_entsize */ 0,
465 /* sh_flags */ SHF_ALLOC + SHF_WRITE
466 },
468 /* .got */
469 {
470 /* name */ ESCN_GOT_name,
471 /* sh_type */ SHT_PROGBITS,
472 /* sh_entsize */ 0,
473 /* sh_flags */ 0
474 },
476 /* .hash */
477 {
478 /* name */ ESCN_HASH_name,
479 /* sh_type */ SHT_HASH,
480 /* sh_entsize */ 0,
481 /* sh_flags */ SHF_ALLOC
482 },
484 /* .init */
485 {
486 /* name */ ESCN_INIT_name,
487 /* sh_type */ SHT_PROGBITS,
488 /* sh_entsize */ 0,
489 /* sh_flags */ SHF_ALLOC + SHF_EXECINSTR
490 },
492 /* .init_array */
493 {
494 /* name */ ESCN_INIT_ARRAY_name,
495 /* sh_type */ SHT_INIT_ARRAY,
496 /* sh_entsize */ 0,
497 /* sh_flags */ SHF_ALLOC + SHF_WRITE
498 },
500 /* .interp */
501 {
502 /* name */ ESCN_INTERP_name,
503 /* sh_type */ SHT_PROGBITS,
504 /* sh_entsize */ 0,
505 /* sh_flags */ 0
506 },
508 /* .line */
509 {
510 /* name */ ESCN_LINE_name,
511 /* sh_type */ SHT_PROGBITS,
512 /* sh_entsize */ 0,
513 /* sh_flags */ 0
514 },
516 /* .note */
517 {
518 /* name */ ESCN_NOTE_name,
519 /* sh_type */ SHT_NOTE,
520 /* sh_entsize */ 0,
521 /* sh_flags */ 0
522 },
524 /* .plt */
525 {
526 /* name */ ESCN_PLT_name,
527 /* sh_type */ SHT_PROGBITS,
528 /* sh_entsize */ 0,
529 /* sh_flags */ 0
530 },
532 /* .preinit_array */
533 {
534 /* name */ ESCN_PREINIT_ARRAY_name,
535 /* sh_type */ SHT_PREINIT_ARRAY,
536 /* sh_entsize */ 0,
537 /* sh_flags */ SHF_ALLOC + SHF_WRITE
538 },
540 /* .rel */
541 {
542 /* name */ ESCN_REL_name,
543 /* sh_type */ SHT_REL,
544 /* sh_entsize */ sizeof(struct Elf32_Rel),
545 /* sh_flags */ 0
546 },
548 /* .rela */
549 {
550 /* name */ ESCN_RELA_name,
551 /* sh_type */ SHT_RELA,
552 /* sh_entsize */ sizeof(struct Elf32_Rela),
553 /* sh_flags */ 0
554 },
556 /* .rodata */
557 {
558 /* name */ ESCN_RODATA_name,
559 /* sh_type */ SHT_PROGBITS,
560 /* sh_entsize */ 0,
561 /* sh_flags */ SHF_ALLOC
562 },
564 /* .rodata1 */
565 {
566 /* name */ ESCN_RODATA1_name,
567 /* sh_type */ SHT_PROGBITS,
568 /* sh_entsize */ 0,
569 /* sh_flags */ SHF_ALLOC
570 },
572 /* .shstrtab */
573 {
574 /* name */ ESCN_SHSTRTAB_name,
575 /* sh_type */ SHT_STRTAB,
576 /* sh_entsize */ sizeof(char),
577 /* sh_flags */ SHF_STRINGS
578 },
580 /* .strtab */
581 {
582 /* name */ ESCN_STRTAB_name,
583 /* sh_type */ SHT_STRTAB,
584 /* sh_entsize */ sizeof(char),
585 /* sh_flags */ SHF_STRINGS
586 },
588 /* .symtab */
589 {
590 /* name */ ESCN_SYMTAB_name,
591 /* sh_type */ SHT_SYMTAB,
592 /* sh_entsize */ sizeof(struct Elf32_Sym),
593 /* sh_flags */ 0
594 },
596 /* .symtab_shndx */
597 {
598 /* name */ ESCN_SYMTAB_SHNDX_name,
599 /* sh_type */ SHT_SYMTAB_SHNDX,
600 /* sh_entsize */ sizeof(Elf32_Word),
601 /* sh_flags */ 0
602 },
604 /* .tbss */
605 {
606 /* name */ ESCN_TBSS_name,
607 /* sh_type */ SHT_NOBITS,
608 /* sh_entsize */ 0,
609 /* sh_flags */ SHF_ALLOC + SHF_WRITE + SHF_TLS
610 },
612 /* .tdata */
613 {
614 /* name */ ESCN_TDATA_name,
615 /* sh_type */ SHT_PROGBITS,
616 /* sh_entsize */ 0,
617 /* sh_flags */ SHF_ALLOC + SHF_WRITE + SHF_TLS
618 },
620 /* .tdata1 */
621 {
622 /* name */ ESCN_TDATA1_name,
623 /* sh_type */ SHT_PROGBITS,
624 /* sh_entsize */ 0,
625 /* sh_flags */ SHF_ALLOC + SHF_WRITE + SHF_TLS
626 },
628 /* .text */
629 {
630 /* name */ ESCN_TEXT_name,
631 /* sh_type */ SHT_PROGBITS,
632 /* sh_entsize */ 0,
633 /* sh_flags */ SHF_ALLOC + SHF_EXECINSTR
634 },
635 #if 0
636 /* .build.attributes */
637 {
638 /* name */ ESCN_ATTRIBUTES_name,
639 /* sh_type */ SHT_ATTRIBUTES,
640 /* sh_entsize */ 0,
641 /* sh_flags */ 0
642 },
643 #endif
644 /* Terminate array with a NULL name field */
645 {
646 /* name */ (const char*)0,
647 /* sh_type */ 0,
648 /* sh_entsize */ 0,
649 /* sh_flags */ 0
650 }
651 };