1 /* MIPS ELF support for BFD.
2 Copyright (C) 1993 Free Software Foundation, Inc.
4 By Ian Lance Taylor, Cygnus Support, <ian@cygnus.com>, from
5 information in the System V Application Binary Interface, MIPS
8 This file is part of BFD, the Binary File Descriptor library.
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
24 /* This file holds definitions specific to the MIPS ELF ABI. Note
25 that most of this is not actually implemented by BFD. */
27 /* Processor specific flags for the ELF header e_flags field. */
29 /* At least one .noreorder directive appears in the source. */
30 #define EF_MIPS_NOREORDER 0x00000001
32 /* File contains position independent code. */
33 #define EF_MIPS_PIC 0x00000002
35 /* Code in file uses the standard calling sequence for calling
36 position independent code. */
37 #define EF_MIPS_CPIC 0x00000004
39 /* Four bit MIPS architecture field. */
40 #define EF_MIPS_ARCH 0xf0000000
42 /* Processor specific section indices. These sections do not actually
43 exist. Symbols with a st_shndx field corresponding to one of these
44 values have a special meaning. */
46 /* Defined and allocated common symbol. Value is virtual address. If
47 relocated, alignment must be preserved. */
48 #define SHN_MIPS_ACOMMON 0xff00
50 /* Small common symbol. */
51 #define SHN_MIPS_SCOMMON 0xff03
53 /* Small undefined symbol. */
54 #define SHN_MIPS_SUNDEFINED 0xff04
56 /* Processor specific section types. */
58 /* Section contains the set of dynamic shared objects used when
59 statically linking. */
60 #define SHT_MIPS_LIBLIST 0x70000000
62 /* Section contains list of symbols whose definitions conflict with
63 symbols defined in shared objects. */
64 #define SHT_MIPS_CONFLICT 0x70000002
66 /* Section contains the global pointer table. */
67 #define SHT_MIPS_GPTAB 0x70000003
69 /* Section contains microcode information. The exact format is
71 #define SHT_MIPS_UCODE 0x70000004
73 /* Section contains some sort of debugging information. The exact
74 format is unspecified. It's probably ECOFF symbols. */
75 #define SHT_MIPS_DEBUG 0x70000005
77 /* Section contains register usage information. */
78 #define SHT_MIPS_REGINFO 0x70000006
80 /* A section of type SHT_MIPS_LIBLIST contains an array of the
81 following structure. The sh_link field is the section index of the
82 string table. The sh_info field is the number of entries in the
86 /* String table index for name of shared object. */
89 Elf32_Word l_time_stamp;
90 /* Checksum of symbol names and common sizes. */
91 Elf32_Word l_checksum;
92 /* String table index for version. */
98 /* The l_flags field of an Elf32_Lib structure may contain the
101 /* Require an exact match at runtime. */
102 #define LL_EXACT_MATCH 0x00000001
104 /* Ignore version incompatibilities at runtime. */
105 #define LL_IGNORE_INT_VER 0x00000002
107 /* A section of type SHT_MIPS_CONFLICT is an array of indices into the
108 .dynsym section. Each element has the following type. */
109 typedef Elf32_Addr Elf32_Conflict;
111 /* A section of type SHT_MIPS_GPTAB contains information about how
112 much GP space would be required for different -G arguments. This
113 information is only used so that the linker can provide informative
114 suggestions as to the best -G value to use. The sh_info field is
115 the index of the section for which this information applies. The
116 contents of the section are an array of the following union. The
117 first element uses the gt_header field. The remaining elements use
118 the gt_entry field. */
123 /* -G value actually used for this object file. */
124 Elf32_Word gt_current_g_value;
126 Elf32_Word gt_unused;
130 /* If this -G argument has been used... */
131 Elf32_Word gt_g_value;
132 /* ...this many GP section bytes would be required. */
137 /* A section of type SHT_MIPS_REGINFO contains the following
141 /* Mask of general purpose registers used. */
142 Elf32_Word ri_gprmask;
143 /* Mask of co-processor registers used. */
144 Elf32_Word ri_cprmask[4];
145 /* GP register value for this object file. */
146 Elf32_SWord ri_gp_value;
149 /* Processor specific section flags. */
151 /* This section must be in the global data area. */
152 define SHF_MIPS_GPREL 0x10000000