Subversion Repositories Kolibri OS

Rev

Rev 5191 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5191 Rev 6324
Line 1... Line 1...
1
/* ELF support for BFD.
1
/* ELF support for BFD.
2
   Copyright 1991-2013 Free Software Foundation, Inc.
2
   Copyright (C) 1991-2015 Free Software Foundation, Inc.
Line 3... Line 3...
3
 
3
 
4
   Written by Fred Fish @ Cygnus Support, from information published
4
   Written by Fred Fish @ Cygnus Support, from information published
5
   in "UNIX System V Release 4, Programmers Guide: ANSI C and
5
   in "UNIX System V Release 4, Programmers Guide: ANSI C and
Line 71... Line 71...
71
#define ELFOSABI_OPENBSD     12	/* OpenBSD */
71
#define ELFOSABI_OPENBSD     12	/* OpenBSD */
72
#define ELFOSABI_OPENVMS     13	/* OpenVMS */
72
#define ELFOSABI_OPENVMS     13	/* OpenVMS */
73
#define ELFOSABI_NSK	     14	/* Hewlett-Packard Non-Stop Kernel */
73
#define ELFOSABI_NSK	     14	/* Hewlett-Packard Non-Stop Kernel */
74
#define ELFOSABI_AROS	     15	/* AROS */
74
#define ELFOSABI_AROS	     15	/* AROS */
75
#define ELFOSABI_FENIXOS     16 /* FenixOS */
75
#define ELFOSABI_FENIXOS     16 /* FenixOS */
-
 
76
#define ELFOSABI_CLOUDABI    17 /* Nuxi CloudABI */
76
#define ELFOSABI_C6000_ELFABI 64 /* Bare-metal TMS320C6000 */
77
#define ELFOSABI_C6000_ELFABI 64 /* Bare-metal TMS320C6000 */
77
#define ELFOSABI_C6000_LINUX 65 /* Linux TMS320C6000 */
78
#define ELFOSABI_C6000_LINUX 65 /* Linux TMS320C6000 */
78
#define ELFOSABI_ARM	     97	/* ARM */
79
#define ELFOSABI_ARM	     97	/* ARM */
79
#define ELFOSABI_STANDALONE 255	/* Standalone (embedded) application */
80
#define ELFOSABI_STANDALONE 255	/* Standalone (embedded) application */
Line 103... Line 104...
103
#define EM_M32		  1	/* AT&T WE 32100 */
104
#define EM_M32		  1	/* AT&T WE 32100 */
104
#define EM_SPARC	  2	/* SUN SPARC */
105
#define EM_SPARC	  2	/* SUN SPARC */
105
#define EM_386		  3	/* Intel 80386 */
106
#define EM_386		  3	/* Intel 80386 */
106
#define EM_68K		  4	/* Motorola m68k family */
107
#define EM_68K		  4	/* Motorola m68k family */
107
#define EM_88K		  5	/* Motorola m88k family */
108
#define EM_88K		  5	/* Motorola m88k family */
108
#define EM_486		  6	/* Intel 80486 *//* Reserved for future use */
109
#define EM_IAMCU	  6	/* Intel MCU */
109
#define EM_860		  7	/* Intel 80860 */
110
#define EM_860		  7	/* Intel 80860 */
110
#define EM_MIPS		  8	/* MIPS R3000 (officially, big-endian only) */
111
#define EM_MIPS		  8	/* MIPS R3000 (officially, big-endian only) */
111
#define EM_S370		  9	/* IBM System/370 */
112
#define EM_S370		  9	/* IBM System/370 */
112
#define EM_MIPS_RS3_LE	 10	/* MIPS R3000 little-endian (Oct 4 1999 Draft) Deprecated */
113
#define EM_MIPS_RS3_LE	 10	/* MIPS R3000 little-endian (Oct 4 1999 Draft) Deprecated */
113
#define EM_res011	 11	/* Reserved */
114
#define EM_res011	 11	/* Reserved */
Line 190... Line 191...
190
#define EM_V850		 87	/* Renesas V850 (formerly NEC V850) */
191
#define EM_V850		 87	/* Renesas V850 (formerly NEC V850) */
191
#define EM_M32R		 88	/* Renesas M32R (formerly Mitsubishi M32R) */
192
#define EM_M32R		 88	/* Renesas M32R (formerly Mitsubishi M32R) */
192
#define EM_MN10300	 89	/* Matsushita MN10300 */
193
#define EM_MN10300	 89	/* Matsushita MN10300 */
193
#define EM_MN10200	 90	/* Matsushita MN10200 */
194
#define EM_MN10200	 90	/* Matsushita MN10200 */
194
#define EM_PJ		 91	/* picoJava */
195
#define EM_PJ		 91	/* picoJava */
195
#define EM_OPENRISC	 92	/* OpenRISC 32-bit embedded processor */
196
#define EM_OR1K		 92	/* OpenRISC 1000 32-bit embedded processor */
196
#define EM_ARC_A5	 93	/* ARC Cores Tangent-A5 */
197
#define EM_ARC_COMPACT	 93	/* ARC International ARCompact processor */
197
#define EM_XTENSA	 94	/* Tensilica Xtensa Architecture */
198
#define EM_XTENSA	 94	/* Tensilica Xtensa Architecture */
198
#define EM_VIDEOCORE	 95	/* Alphamosaic VideoCore processor */
199
#define EM_VIDEOCORE	 95	/* Alphamosaic VideoCore processor */
199
#define EM_TMM_GPP	 96	/* Thompson Multimedia General Purpose Processor */
200
#define EM_TMM_GPP	 96	/* Thompson Multimedia General Purpose Processor */
200
#define EM_NS32K	 97	/* National Semiconductor 32000 series */
201
#define EM_NS32K	 97	/* National Semiconductor 32000 series */
201
#define EM_TPC		 98	/* Tenor Network TPC processor */
202
#define EM_TPC		 98	/* Tenor Network TPC processor */
Line 292... Line 293...
292
#define EM_TILE64	187	/* Tilera TILE64 multicore architecture family */
293
#define EM_TILE64	187	/* Tilera TILE64 multicore architecture family */
293
#define EM_TILEPRO	188	/* Tilera TILEPro multicore architecture family */
294
#define EM_TILEPRO	188	/* Tilera TILEPro multicore architecture family */
294
#define EM_MICROBLAZE	189	/* Xilinx MicroBlaze 32-bit RISC soft processor core */
295
#define EM_MICROBLAZE	189	/* Xilinx MicroBlaze 32-bit RISC soft processor core */
295
#define EM_CUDA		190	/* NVIDIA CUDA architecture */
296
#define EM_CUDA		190	/* NVIDIA CUDA architecture */
296
#define EM_TILEGX	191	/* Tilera TILE-Gx multicore architecture family */
297
#define EM_TILEGX	191	/* Tilera TILE-Gx multicore architecture family */
-
 
298
#define EM_ARC_COMPACT2 195	/* Synopsys ARCompact V2 */
297
#define EM_RL78		197	/* Renesas RL78 family.  */
299
#define EM_RL78		197	/* Renesas RL78 family.  */
298
#define EM_78K0R	199	/* Renesas 78K0R.  */
300
#define EM_78K0R	199	/* Renesas 78K0R.  */
299
#define EM_INTEL205	205	/* Reserved by Intel */
301
#define EM_INTEL205	205	/* Reserved by Intel */
300
#define EM_INTEL206	206	/* Reserved by Intel */
302
#define EM_INTEL206	206	/* Reserved by Intel */
301
#define EM_INTEL207	207	/* Reserved by Intel */
303
#define EM_INTEL207	207	/* Reserved by Intel */
302
#define EM_INTEL208	208	/* Reserved by Intel */
304
#define EM_INTEL208	208	/* Reserved by Intel */
303
#define EM_INTEL209	209	/* Reserved by Intel */
305
#define EM_INTEL209	209	/* Reserved by Intel */
-
 
306
#define EM_VISIUM	221	/* Controls and Data Services VISIUMcore processor */
-
 
307
#define EM_FT32         222     /* FTDI Chip FT32 high performance 32-bit RISC architecture */
-
 
308
#define EM_MOXIE        223     /* Moxie processor family */
Line 304... Line 309...
304
 
309
 
305
/* If it is necessary to assign new unofficial EM_* values, please pick large
310
/* If it is necessary to assign new unofficial EM_* values, please pick large
306
   random numbers (0x8523, 0xa7f2, etc.) to minimize the chances of collision
311
   random numbers (0x8523, 0xa7f2, etc.) to minimize the chances of collision
Line 337... Line 342...
337
#define EM_MT			0x2530
342
#define EM_MT			0x2530
Line 338... Line 343...
338
 
343
 
339
/* FR30 magic number - no EABI available.  */
344
/* FR30 magic number - no EABI available.  */
Line 340... Line -...
340
#define EM_CYGNUS_FR30		0x3330
-
 
341
 
-
 
342
/* OpenRISC magic number.  Written in the absense of an ABI.  */
-
 
343
#define EM_OPENRISC_OLD		0x3426
345
#define EM_CYGNUS_FR30		0x3330
344
 
346
 
Line 345... Line 347...
345
/* DLX magic number.  Written in the absense of an ABI.  */
347
/* DLX magic number.  Written in the absense of an ABI.  */
346
#define EM_DLX			0x5aa5
348
#define EM_DLX			0x5aa5
Line 358... Line 360...
358
#define EM_CYGNUS_D30V		0x7676
360
#define EM_CYGNUS_D30V		0x7676
Line 359... Line 361...
359
 
361
 
360
/* Ubicom IP2xxx;   Written in the absense of an ABI.  */
362
/* Ubicom IP2xxx;   Written in the absense of an ABI.  */
Line 361... Line -...
361
#define EM_IP2K_OLD		0x8217
-
 
362
 
-
 
363
/* (Deprecated) Temporary number for the OpenRISC processor.  */
-
 
364
#define EM_OR32			0x8472
363
#define EM_IP2K_OLD		0x8217
365
 
364
 
Line 366... Line 365...
366
/* Cygnus PowerPC ELF backend.  Written in the absence of an ABI.  */
365
/* Cygnus PowerPC ELF backend.  Written in the absence of an ABI.  */
367
#define EM_CYGNUS_POWERPC	0x9025
366
#define EM_CYGNUS_POWERPC	0x9025
Line 397... Line 396...
397
/* NIOS magic number - no EABI available.  */
396
/* NIOS magic number - no EABI available.  */
398
#define EM_NIOS32		0xFEBB
397
#define EM_NIOS32		0xFEBB
Line 399... Line 398...
399
 
398
 
Line -... Line 399...
-
 
399
#define EM_CYGNUS_MEP		0xF00D  /* Toshiba MeP */
400
#define EM_CYGNUS_MEP		0xF00D  /* Toshiba MeP */
400
 
Line 401... Line 401...
401
 
401
/* Old, unofficial value for Moxie.  */
402
#define EM_MOXIE                0xFEED  /* Moxie */
402
#define EM_MOXIE_OLD            0xFEED
Line 403... Line 403...
403
 
403
 
Line 404... Line 404...
404
/* Old Sunplus S+core7 backend magic number. Written in the absence of an ABI.  */
404
/* Old Sunplus S+core7 backend magic number. Written in the absence of an ABI.  */
Line -... Line 405...
-
 
405
#define EM_SCORE_OLD            95
-
 
406
 
-
 
407
#define EM_MICROBLAZE_OLD	0xbaab	/* Old MicroBlaze */
405
#define EM_SCORE_OLD            95
408
 
Line 406... Line 409...
406
 
409
#define EM_ADAPTEVA_EPIPHANY   0x1223  /* Adapteva's Epiphany architecture.  */
Line 407... Line 410...
407
#define EM_MICROBLAZE_OLD	0xbaab	/* Old MicroBlaze */
410
 
Line 503... Line 506...
503
#define SHF_INFO_LINK	(1 << 6)	/* sh_info holds section header table index */
506
#define SHF_INFO_LINK	(1 << 6)	/* sh_info holds section header table index */
504
#define SHF_LINK_ORDER	(1 << 7)	/* Preserve section ordering when linking */
507
#define SHF_LINK_ORDER	(1 << 7)	/* Preserve section ordering when linking */
505
#define SHF_OS_NONCONFORMING (1 << 8)	/* OS specific processing required */
508
#define SHF_OS_NONCONFORMING (1 << 8)	/* OS specific processing required */
506
#define SHF_GROUP	(1 << 9)	/* Member of a section group */
509
#define SHF_GROUP	(1 << 9)	/* Member of a section group */
507
#define SHF_TLS		(1 << 10)	/* Thread local storage section */
510
#define SHF_TLS		(1 << 10)	/* Thread local storage section */
-
 
511
#define SHF_COMPRESSED	(1 << 11)	/* Section with compressed data */
Line 508... Line 512...
508
 
512
 
509
/* #define SHF_MASKOS	0x0F000000    *//* OS-specific semantics */
513
/* #define SHF_MASKOS	0x0F000000    *//* OS-specific semantics */
510
#define SHF_MASKOS	0x0FF00000	/* New value, Oct 4, 1999 Draft */
514
#define SHF_MASKOS	0x0FF00000	/* New value, Oct 4, 1999 Draft */
Line 517... Line 521...
517
					   and shared library that it
521
					   and shared library that it
518
					   builds when those objects
522
					   builds when those objects
519
					   are not to be further
523
					   are not to be further
520
					   relocated.  */
524
					   relocated.  */
Line -... Line 525...
-
 
525
 
-
 
526
/* Compression types */
-
 
527
#define ELFCOMPRESS_ZLIB   1		/* Compressed with zlib.  */
-
 
528
#define ELFCOMPRESS_LOOS   0x60000000	/* OS-specific semantics, lo */
-
 
529
#define ELFCOMPRESS_HIOS   0x6FFFFFFF	/* OS-specific semantics, hi */
-
 
530
#define ELFCOMPRESS_LOPROC 0x70000000	/* Processor-specific semantics, lo */
-
 
531
#define ELFCOMPRESS_HIPROC 0x7FFFFFFF	/* Processor-specific semantics, hi */
521
 
532
 
Line 522... Line 533...
522
/* Values of note segment descriptor types for core files.  */
533
/* Values of note segment descriptor types for core files.  */
523
 
534
 
524
#define NT_PRSTATUS	1		/* Contains copy of prstatus struct */
535
#define NT_PRSTATUS	1		/* Contains copy of prstatus struct */
Line 554... Line 565...
554
					/*   note name must be "LINUX".  */
565
					/*   note name must be "LINUX".  */
555
#define NT_S390_SYSTEM_CALL     0x307   /* S390 system call restart data */
566
#define NT_S390_SYSTEM_CALL     0x307   /* S390 system call restart data */
556
					/*   note name must be "LINUX".  */
567
					/*   note name must be "LINUX".  */
557
#define NT_S390_TDB	0x308		/* S390 transaction diagnostic block */
568
#define NT_S390_TDB	0x308		/* S390 transaction diagnostic block */
558
					/*   note name must be "LINUX".  */
569
					/*   note name must be "LINUX".  */
-
 
570
#define NT_S390_VXRS_LOW	0x309	/* S390 vector registers 0-15 upper half */
-
 
571
					/*   note name must be "LINUX".  */
-
 
572
#define NT_S390_VXRS_HIGH	0x30a	/* S390 vector registers 16-31 */
-
 
573
					/*   note name must be "LINUX".  */
559
#define NT_ARM_VFP	0x400		/* ARM VFP registers */
574
#define NT_ARM_VFP	0x400		/* ARM VFP registers */
560
/* The following definitions should really use NT_AARCH_..., but defined
575
/* The following definitions should really use NT_AARCH_..., but defined
561
   this way for compatibility with Linux.  */
576
   this way for compatibility with Linux.  */
562
#define NT_ARM_TLS	0x401		/* AArch TLS registers */
577
#define NT_ARM_TLS	0x401		/* AArch TLS registers */
563
					/*   note name must be "LINUX".  */
578
					/*   note name must be "LINUX".  */
Line 619... Line 634...
619
#define GNU_ABI_TAG_LINUX	0
634
#define GNU_ABI_TAG_LINUX	0
620
#define GNU_ABI_TAG_HURD	1
635
#define GNU_ABI_TAG_HURD	1
621
#define GNU_ABI_TAG_SOLARIS	2
636
#define GNU_ABI_TAG_SOLARIS	2
622
#define GNU_ABI_TAG_FREEBSD	3
637
#define GNU_ABI_TAG_FREEBSD	3
623
#define GNU_ABI_TAG_NETBSD	4
638
#define GNU_ABI_TAG_NETBSD	4
-
 
639
#define GNU_ABI_TAG_SYLLABLE	5
-
 
640
#define GNU_ABI_TAG_NACL	6
Line 624... Line 641...
624
 
641
 
Line 625... Line 642...
625
/* Values for NetBSD .note.netbsd.ident notes.  Note name is "NetBSD".  */
642
/* Values for NetBSD .note.netbsd.ident notes.  Note name is "NetBSD".  */
-
 
643
 
Line 626... Line 644...
626
 
644
#define NT_NETBSD_IDENT		1
Line 627... Line 645...
627
#define NT_NETBSD_IDENT		1
645
#define NT_NETBSD_MARCH		5
Line 849... Line 867...
849
#define	DF_1_EDITED	0x00200000
867
#define	DF_1_EDITED	0x00200000
850
#define	DF_1_NORELOC	0x00400000
868
#define	DF_1_NORELOC	0x00400000
851
#define	DF_1_SYMINTPOSE	0x00800000
869
#define	DF_1_SYMINTPOSE	0x00800000
852
#define	DF_1_GLOBAUDIT	0x01000000
870
#define	DF_1_GLOBAUDIT	0x01000000
853
#define	DF_1_SINGLETON	0x02000000
871
#define	DF_1_SINGLETON	0x02000000
-
 
872
#define	DF_1_STUB	0x04000000
-
 
873
#define	DF_1_PIE	0x08000000
Line 854... Line 874...
854
 
874
 
855
/* Flag values for the DT_FLAGS entry.	*/
875
/* Flag values for the DT_FLAGS entry.	*/
856
#define DF_ORIGIN	(1 << 0)
876
#define DF_ORIGIN	(1 << 0)
857
#define DF_SYMBOLIC	(1 << 1)
877
#define DF_SYMBOLIC	(1 << 1)
Line 957... Line 977...
957
#define AT_IGNOREPPC	22		/* Entry should be ignored */
977
#define AT_IGNOREPPC	22		/* Entry should be ignored */
958
#define	AT_SECURE	23		/* Boolean, was exec setuid-like?  */
978
#define	AT_SECURE	23		/* Boolean, was exec setuid-like?  */
959
#define AT_BASE_PLATFORM 24		/* String identifying real platform,
979
#define AT_BASE_PLATFORM 24		/* String identifying real platform,
960
					   may differ from AT_PLATFORM.  */
980
					   may differ from AT_PLATFORM.  */
961
#define AT_RANDOM	25		/* Address of 16 random bytes.  */
981
#define AT_RANDOM	25		/* Address of 16 random bytes.  */
-
 
982
#define AT_HWCAP2	26		/* Extension of AT_HWCAP.  */
962
#define AT_EXECFN	31		/* Filename of executable.  */
983
#define AT_EXECFN	31		/* Filename of executable.  */
963
/* Pointer to the global system page used for system calls and other
984
/* Pointer to the global system page used for system calls and other
964
   nice things.  */
985
   nice things.  */
965
#define AT_SYSINFO	32
986
#define AT_SYSINFO	32
966
#define AT_SYSINFO_EHDR	33 /* Pointer to ELF header of system-supplied DSO.  */
987
#define AT_SYSINFO_EHDR	33 /* Pointer to ELF header of system-supplied DSO.  */