blob: 6e863929c7c878852eff1c3974c8c52aca1d3816 [file] [log] [blame]
Rafael Espindola9d06ab62015-09-22 00:01:39 +00001//===- InputSection.h -------------------------------------------*- C++ -*-===//
Michael J. Spencer84487f12015-07-24 21:03:07 +00002//
3// The LLVM Linker
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
Rafael Espindola9d06ab62015-09-22 00:01:39 +000010#ifndef LLD_ELF_INPUT_SECTION_H
11#define LLD_ELF_INPUT_SECTION_H
Michael J. Spencer84487f12015-07-24 21:03:07 +000012
Rui Ueyamac4aaed92015-10-22 18:49:53 +000013#include "Config.h"
Rui Ueyama0fcdc732016-05-24 20:24:43 +000014#include "Relocations.h"
Peter Smithfb05cd92016-07-08 16:10:27 +000015#include "Thunks.h"
Michael J. Spencer84487f12015-07-24 21:03:07 +000016#include "lld/Core/LLVM.h"
Rui Ueyamab91bf1a2016-05-23 16:55:43 +000017#include "llvm/ADT/DenseSet.h"
Rui Ueyamac00718f2016-02-23 03:34:37 +000018#include "llvm/ADT/TinyPtrVector.h"
Michael J. Spencer84487f12015-07-24 21:03:07 +000019#include "llvm/Object/ELF.h"
20
21namespace lld {
Rafael Espindolae0df00b2016-02-28 00:25:54 +000022namespace elf {
Michael J. Spencer84487f12015-07-24 21:03:07 +000023
Rafael Espindolae7553e42016-08-31 13:28:33 +000024class DefinedCommon;
Rafael Espindola38c67a22016-04-15 14:41:56 +000025class SymbolBody;
Rafael Espindola32aca872016-10-05 18:40:00 +000026struct SectionPiece;
Rafael Espindola38c67a22016-04-15 14:41:56 +000027
Rui Ueyama0b289522016-02-25 18:43:51 +000028template <class ELFT> class ICF;
Rafael Espindolaccfe3cb2016-04-04 14:04:16 +000029template <class ELFT> class DefinedRegular;
Michael J. Spencer84487f12015-07-24 21:03:07 +000030template <class ELFT> class ObjectFile;
Rafael Espindola832b93f2015-08-24 20:06:32 +000031template <class ELFT> class OutputSection;
Rui Ueyamac7cc6ec2015-10-15 22:27:29 +000032template <class ELFT> class OutputSectionBase;
Michael J. Spencer84487f12015-07-24 21:03:07 +000033
Eugene Leviant97403d12016-09-01 09:55:57 +000034// We need non-template input section class to store symbol layout
35// in linker script parser structures, where we do not have ELFT
36// template parameter. For each scripted output section symbol we
37// store pointer to preceding InputSectionData object or nullptr,
38// if symbol should be placed at the very beginning of the output
39// section
40class InputSectionData {
41public:
42 enum Kind { Regular, EHFrame, Merge, MipsReginfo, MipsOptions, MipsAbiFlags };
43
44 // The garbage collector sets sections' Live bits.
45 // If GC is disabled, all sections are considered live by default.
Rafael Espindolac7e1e032016-09-12 13:13:53 +000046 InputSectionData(Kind SectionKind, StringRef Name, ArrayRef<uint8_t> Data,
47 bool Compressed, bool Live)
Rafael Espindola042a3f22016-09-08 14:06:08 +000048 : SectionKind(SectionKind), Live(Live), Compressed(Compressed),
Rafael Espindolac7e1e032016-09-12 13:13:53 +000049 Name(Name), Data(Data) {}
Eugene Leviant97403d12016-09-01 09:55:57 +000050
Rafael Espindola16853bb2016-09-08 12:33:41 +000051private:
52 unsigned SectionKind : 3;
Eugene Leviant97403d12016-09-01 09:55:57 +000053
Rafael Espindola16853bb2016-09-08 12:33:41 +000054public:
55 Kind kind() const { return (Kind)SectionKind; }
56
Rui Ueyama388838e2016-10-20 05:23:23 +000057 unsigned Live : 1; // for garbage collection
Rafael Espindola16853bb2016-09-08 12:33:41 +000058 unsigned Compressed : 1;
Rafael Espindola16853bb2016-09-08 12:33:41 +000059 uint32_t Alignment;
Rafael Espindola042a3f22016-09-08 14:06:08 +000060 StringRef Name;
Rafael Espindolac7e1e032016-09-12 13:13:53 +000061 ArrayRef<uint8_t> Data;
62
Rafael Espindola0e090522016-10-26 00:54:03 +000063 template <typename T> llvm::ArrayRef<T> getDataAs() const {
64 size_t S = Data.size();
65 assert(S % sizeof(T) == 0);
66 return llvm::makeArrayRef<T>((const T *)Data.data(), S / sizeof(T));
67 }
68
Rafael Espindola54f16142016-09-12 13:06:10 +000069 // If a section is compressed, this has the uncompressed section data.
Rui Ueyama05384082016-10-12 22:36:31 +000070 std::unique_ptr<uint8_t[]> UncompressedData;
Rafael Espindola0a758502016-09-07 20:41:19 +000071
72 std::vector<Relocation> Relocations;
Eugene Leviant97403d12016-09-01 09:55:57 +000073};
74
Rafael Espindola71675852015-09-22 00:16:19 +000075// This corresponds to a section of an input file.
Eugene Leviant97403d12016-09-01 09:55:57 +000076template <class ELFT> class InputSectionBase : public InputSectionData {
Rafael Espindolac159c962015-10-19 21:00:02 +000077protected:
Rui Ueyama1d12ac12016-07-07 03:55:55 +000078 typedef typename ELFT::Chdr Elf_Chdr;
Rafael Espindola197d6a82016-04-22 16:39:59 +000079 typedef typename ELFT::Rel Elf_Rel;
80 typedef typename ELFT::Rela Elf_Rela;
Rui Ueyama9328b2c2016-03-14 23:16:09 +000081 typedef typename ELFT::Shdr Elf_Shdr;
82 typedef typename ELFT::Sym Elf_Sym;
83 typedef typename ELFT::uint uintX_t;
Rafael Espindolac159c962015-10-19 21:00:02 +000084
85 // The file this section is from.
86 ObjectFile<ELFT> *File;
Michael J. Spencer84487f12015-07-24 21:03:07 +000087
Rafael Espindola1854a8e2016-10-26 12:36:56 +000088public:
Rafael Espindola0e090522016-10-26 00:54:03 +000089 // These corresponds to the fields in Elf_Shdr.
90 uintX_t Flags;
Eugene Leviantc4681202016-11-01 09:17:50 +000091 uintX_t Offset = 0;
Rafael Espindola0e090522016-10-26 00:54:03 +000092 uintX_t Entsize;
93 uint32_t Type;
94 uint32_t Link;
95 uint32_t Info;
96
Rafael Espindola042a3f22016-09-08 14:06:08 +000097 InputSectionBase()
Rafael Espindolac7e1e032016-09-12 13:13:53 +000098 : InputSectionData(Regular, "", ArrayRef<uint8_t>(), false, false),
99 Repl(this) {}
Rafael Espindolaccfe3cb2016-04-04 14:04:16 +0000100
Rafael Espindolac159c962015-10-19 21:00:02 +0000101 InputSectionBase(ObjectFile<ELFT> *File, const Elf_Shdr *Header,
Rafael Espindola042a3f22016-09-08 14:06:08 +0000102 StringRef Name, Kind SectionKind);
Rafael Espindola0e090522016-10-26 00:54:03 +0000103 InputSectionBase(ObjectFile<ELFT> *File, uintX_t Flags, uint32_t Type,
104 uintX_t Entsize, uint32_t Link, uint32_t Info,
105 uintX_t Addralign, ArrayRef<uint8_t> Data, StringRef Name,
106 Kind SectionKind);
Rafael Espindolac159c962015-10-19 21:00:02 +0000107 OutputSectionBase<ELFT> *OutSec = nullptr;
Rui Ueyamac4aaed92015-10-22 18:49:53 +0000108
Rui Ueyama0b289522016-02-25 18:43:51 +0000109 // This pointer points to the "real" instance of this instance.
110 // Usually Repl == this. However, if ICF merges two sections,
111 // Repl pointer of one section points to another section. So,
112 // if you need to get a pointer to this instance, do not use
113 // this but instead this->Repl.
114 InputSectionBase<ELFT> *Repl;
115
Rafael Espindola1a541122016-11-08 14:47:16 +0000116 // Returns the size of this section (even if this is a common or BSS.)
117 size_t getSize() const;
118
Rafael Espindolaccfe3cb2016-04-04 14:04:16 +0000119 static InputSectionBase<ELFT> Discarded;
Rafael Espindola83b0dc62015-08-13 22:21:37 +0000120
Rafael Espindolae1901cc2015-09-24 15:11:50 +0000121 ObjectFile<ELFT> *getFile() const { return File; }
Rafael Espindola77dbe9a2016-11-09 14:39:20 +0000122 llvm::object::ELFFile<ELFT> getObj() const { return File->getObj(); }
Rui Ueyama809d8e22016-06-23 04:33:42 +0000123 uintX_t getOffset(const DefinedRegular<ELFT> &Sym) const;
Peter Smith0a259f32016-10-10 09:39:26 +0000124 InputSectionBase *getLinkOrderDep() const;
Rafael Espindoladb9bf4d2015-11-11 16:50:37 +0000125 // Translate an offset in the input section to an offset in the output
126 // section.
Rui Ueyama809d8e22016-06-23 04:33:42 +0000127 uintX_t getOffset(uintX_t Offset) const;
Rafael Espindoladb9bf4d2015-11-11 16:50:37 +0000128
George Rimar602fbee2016-06-24 11:18:44 +0000129 void uncompress();
130
Rafael Espindola22ef9562016-04-13 01:40:19 +0000131 void relocate(uint8_t *Buf, uint8_t *BufEnd);
Rui Ueyama05384082016-10-12 22:36:31 +0000132
133private:
134 std::pair<ArrayRef<uint8_t>, uint64_t>
135 getElfCompressedData(ArrayRef<uint8_t> Data);
136
137 std::pair<ArrayRef<uint8_t>, uint64_t>
138 getRawCompressedData(ArrayRef<uint8_t> Data);
Rafael Espindolac159c962015-10-19 21:00:02 +0000139};
140
Rafael Espindolaccfe3cb2016-04-04 14:04:16 +0000141template <class ELFT> InputSectionBase<ELFT> InputSectionBase<ELFT>::Discarded;
Rafael Espindolac159c962015-10-19 21:00:02 +0000142
Rui Ueyama3ea87272016-05-22 00:13:04 +0000143// SectionPiece represents a piece of splittable section contents.
Rafael Espindola113860b2016-10-20 10:55:58 +0000144// We allocate a lot of these and binary search on them. This means that they
145// have to be as compact as possible, which is why we don't store the size (can
146// be found by looking at the next one) and put the hash in a side table.
Rui Ueyama3ea87272016-05-22 00:13:04 +0000147struct SectionPiece {
Rafael Espindola113860b2016-10-20 10:55:58 +0000148 SectionPiece(size_t Off, bool Live = false)
149 : InputOff(Off), OutputOff(-1), Live(Live || !Config->GcSections) {}
Rui Ueyama34dc99e2016-05-22 01:15:32 +0000150
Rui Ueyama3ea87272016-05-22 00:13:04 +0000151 size_t InputOff;
Rafael Espindola113860b2016-10-20 10:55:58 +0000152 ssize_t OutputOff : 8 * sizeof(ssize_t) - 1;
Hans Wennborg7314c482016-10-20 15:59:08 +0000153 size_t Live : 1;
Rui Ueyama3ea87272016-05-22 00:13:04 +0000154};
Rafael Espindola113860b2016-10-20 10:55:58 +0000155static_assert(sizeof(SectionPiece) == 2 * sizeof(size_t),
156 "SectionPiece is too big");
Rui Ueyama3ea87272016-05-22 00:13:04 +0000157
Rafael Espindolac159c962015-10-19 21:00:02 +0000158// This corresponds to a SHF_MERGE section of an input file.
Rafael Espindola6eae9f22016-07-21 13:32:37 +0000159template <class ELFT> class MergeInputSection : public InputSectionBase<ELFT> {
Rui Ueyama9328b2c2016-03-14 23:16:09 +0000160 typedef typename ELFT::uint uintX_t;
161 typedef typename ELFT::Sym Elf_Sym;
162 typedef typename ELFT::Shdr Elf_Shdr;
Rafael Espindolac159c962015-10-19 21:00:02 +0000163
164public:
Rafael Espindola042a3f22016-09-08 14:06:08 +0000165 MergeInputSection(ObjectFile<ELFT> *F, const Elf_Shdr *Header,
166 StringRef Name);
Rafael Espindola99558ef2016-10-26 18:44:57 +0000167 static bool classof(const InputSectionData *S);
Rui Ueyamab91bf1a2016-05-23 16:55:43 +0000168 void splitIntoPieces();
169
170 // Mark the piece at a given offset live. Used by GC.
Rafael Espindola116d83f2016-10-19 23:13:40 +0000171 void markLiveAt(uintX_t Offset) {
Rafael Espindola1854a8e2016-10-26 12:36:56 +0000172 assert(this->Flags & llvm::ELF::SHF_ALLOC);
Rafael Espindola116d83f2016-10-19 23:13:40 +0000173 LiveOffsets.insert(Offset);
174 }
Rui Ueyamab91bf1a2016-05-23 16:55:43 +0000175
176 // Translate an offset in the input section to an offset
177 // in the output section.
Rui Ueyama809d8e22016-06-23 04:33:42 +0000178 uintX_t getOffset(uintX_t Offset) const;
Rui Ueyamab91bf1a2016-05-23 16:55:43 +0000179
Rui Ueyama406b4692016-05-27 14:39:13 +0000180 void finalizePieces();
181
Rafael Espindola6eae9f22016-07-21 13:32:37 +0000182 // Splittable sections are handled as a sequence of data
183 // rather than a single large blob of data.
184 std::vector<SectionPiece> Pieces;
Rafael Espindola113860b2016-10-20 10:55:58 +0000185 ArrayRef<uint8_t> getData(std::vector<SectionPiece>::const_iterator I) const;
186 std::vector<uint32_t> Hashes;
Rafael Espindola6eae9f22016-07-21 13:32:37 +0000187
188 // Returns the SectionPiece at a given input section offset.
189 SectionPiece *getSectionPiece(uintX_t Offset);
190 const SectionPiece *getSectionPiece(uintX_t Offset) const;
191
Rui Ueyamab91bf1a2016-05-23 16:55:43 +0000192private:
Rui Ueyamad6bd1372016-08-03 04:39:42 +0000193 std::vector<SectionPiece> splitStrings(ArrayRef<uint8_t> A, size_t Size);
194 std::vector<SectionPiece> splitNonStrings(ArrayRef<uint8_t> A, size_t Size);
195
Rui Ueyama406b4692016-05-27 14:39:13 +0000196 llvm::DenseMap<uintX_t, uintX_t> OffsetMap;
Rui Ueyamab91bf1a2016-05-23 16:55:43 +0000197 llvm::DenseSet<uintX_t> LiveOffsets;
Rafael Espindolac159c962015-10-19 21:00:02 +0000198};
199
Rafael Espindola2deeb602016-07-21 20:18:30 +0000200struct EhSectionPiece : public SectionPiece {
201 EhSectionPiece(size_t Off, ArrayRef<uint8_t> Data, unsigned FirstRelocation)
Rafael Espindola113860b2016-10-20 10:55:58 +0000202 : SectionPiece(Off, false), Data(Data.data()), Size(Data.size()),
Rafael Espindola32aca872016-10-05 18:40:00 +0000203 FirstRelocation(FirstRelocation) {}
204 const uint8_t *Data;
Rafael Espindola113860b2016-10-20 10:55:58 +0000205 uint32_t Size;
206 uint32_t size() const { return Size; }
207
208 ArrayRef<uint8_t> data() { return {Data, Size}; }
Rafael Espindola2deeb602016-07-21 20:18:30 +0000209 unsigned FirstRelocation;
210};
211
Rafael Espindola0c6a4f12015-11-11 19:54:14 +0000212// This corresponds to a .eh_frame section of an input file.
Rafael Espindola6eae9f22016-07-21 13:32:37 +0000213template <class ELFT> class EhInputSection : public InputSectionBase<ELFT> {
Rafael Espindola0c6a4f12015-11-11 19:54:14 +0000214public:
Rui Ueyama9328b2c2016-03-14 23:16:09 +0000215 typedef typename ELFT::Shdr Elf_Shdr;
216 typedef typename ELFT::uint uintX_t;
Rafael Espindola042a3f22016-09-08 14:06:08 +0000217 EhInputSection(ObjectFile<ELFT> *F, const Elf_Shdr *Header, StringRef Name);
Rafael Espindola99558ef2016-10-26 18:44:57 +0000218 static bool classof(const InputSectionData *S);
Rui Ueyama88abd9b2016-05-22 23:53:00 +0000219 void split();
Rafael Espindola2deeb602016-07-21 20:18:30 +0000220 template <class RelTy> void split(ArrayRef<RelTy> Rels);
Rafael Espindola0c6a4f12015-11-11 19:54:14 +0000221
Rafael Espindola6eae9f22016-07-21 13:32:37 +0000222 // Splittable sections are handled as a sequence of data
223 // rather than a single large blob of data.
Rafael Espindola2deeb602016-07-21 20:18:30 +0000224 std::vector<EhSectionPiece> Pieces;
Rafael Espindola6eae9f22016-07-21 13:32:37 +0000225
Rafael Espindola0c6a4f12015-11-11 19:54:14 +0000226 // Relocation section that refer to this one.
227 const Elf_Shdr *RelocSection = nullptr;
228};
229
Rafael Espindolac159c962015-10-19 21:00:02 +0000230// This corresponds to a non SHF_MERGE section of an input file.
231template <class ELFT> class InputSection : public InputSectionBase<ELFT> {
Rui Ueyama0b289522016-02-25 18:43:51 +0000232 friend ICF<ELFT>;
Rafael Espindolac159c962015-10-19 21:00:02 +0000233 typedef InputSectionBase<ELFT> Base;
Rui Ueyama9328b2c2016-03-14 23:16:09 +0000234 typedef typename ELFT::Shdr Elf_Shdr;
235 typedef typename ELFT::Rela Elf_Rela;
236 typedef typename ELFT::Rel Elf_Rel;
237 typedef typename ELFT::Sym Elf_Sym;
238 typedef typename ELFT::uint uintX_t;
Rafael Espindolac159c962015-10-19 21:00:02 +0000239
240public:
Rafael Espindola0e090522016-10-26 00:54:03 +0000241 InputSection(uintX_t Flags, uint32_t Type, uintX_t Addralign,
Rafael Espindola093abab2016-10-27 17:45:40 +0000242 ArrayRef<uint8_t> Data, StringRef Name);
Rafael Espindola042a3f22016-09-08 14:06:08 +0000243 InputSection(ObjectFile<ELFT> *F, const Elf_Shdr *Header, StringRef Name);
Rafael Espindolac159c962015-10-19 21:00:02 +0000244
245 // Write this section to a mmap'ed file, assuming Buf is pointing to
246 // beginning of the output section.
Rafael Espindola1a541122016-11-08 14:47:16 +0000247 void writeTo(uint8_t *Buf);
Rafael Espindolac159c962015-10-19 21:00:02 +0000248
Michael J. Spencer67bc8d62015-08-27 23:15:56 +0000249 // Relocation sections that refer to this one.
Rui Ueyamac00718f2016-02-23 03:34:37 +0000250 llvm::TinyPtrVector<const Elf_Shdr *> RelocSections;
Michael J. Spencer67bc8d62015-08-27 23:15:56 +0000251
Rui Ueyamaedffd912015-10-14 21:00:23 +0000252 // The offset from beginning of the output sections this section was assigned
253 // to. The writer sets a value.
Rui Ueyama55c3f892015-10-15 01:58:40 +0000254 uint64_t OutSecOff = 0;
Rui Ueyamaedffd912015-10-14 21:00:23 +0000255
Peter Smith07606052016-10-10 10:10:27 +0000256 // InputSection that is dependent on us (reverse dependency for GC)
257 InputSectionBase<ELFT> *DependentSection = nullptr;
258
Rafael Espindola99558ef2016-10-26 18:44:57 +0000259 static bool classof(const InputSectionData *S);
George Rimar58941ee2016-02-25 08:23:37 +0000260
261 InputSectionBase<ELFT> *getRelocatedSection();
262
Simon Atanasyan13f6da12016-03-31 21:26:23 +0000263 // Register thunk related to the symbol. When the section is written
264 // to a mmap'ed file, target is requested to write an actual thunk code.
Peter Smithfb05cd92016-07-08 16:10:27 +0000265 // Now thunks is supported for MIPS and ARM target only.
266 void addThunk(const Thunk<ELFT> *T);
Simon Atanasyan13f6da12016-03-31 21:26:23 +0000267
268 // The offset of synthetic thunk code from beginning of this section.
269 uint64_t getThunkOff() const;
270
271 // Size of chunk with thunks code.
272 uint64_t getThunksSize() const;
273
Rui Ueyama2b6fb802016-04-28 18:42:04 +0000274 template <class RelTy>
275 void relocateNonAlloc(uint8_t *Buf, llvm::ArrayRef<RelTy> Rels);
276
George Rimar58941ee2016-02-25 08:23:37 +0000277private:
Rui Ueyamafc467e72016-03-13 05:06:50 +0000278 template <class RelTy>
Rafael Espindola0f7ccc32016-04-05 14:47:28 +0000279 void copyRelocations(uint8_t *Buf, llvm::ArrayRef<RelTy> Rels);
Rui Ueyama0b289522016-02-25 18:43:51 +0000280
281 // Called by ICF to merge two input sections.
282 void replace(InputSection<ELFT> *Other);
283
284 // Used by ICF.
285 uint64_t GroupId = 0;
Simon Atanasyan13f6da12016-03-31 21:26:23 +0000286
Peter Smithfb05cd92016-07-08 16:10:27 +0000287 llvm::TinyPtrVector<const Thunk<ELFT> *> Thunks;
Michael J. Spencer84487f12015-07-24 21:03:07 +0000288};
289
Simon Atanasyan1d7df402015-12-20 10:57:34 +0000290// MIPS .reginfo section provides information on the registers used by the code
291// in the object file. Linker should collect this information and write a single
292// .reginfo section in the output file. The output section contains a union of
293// used registers masks taken from input .reginfo sections and final value
294// of the `_gp` symbol. For details: Chapter 4 / "Register Information" at
295// ftp://www.linux-mips.org/pub/linux/mips/doc/ABI/mipsabi.pdf
296template <class ELFT>
297class MipsReginfoInputSection : public InputSectionBase<ELFT> {
Rui Ueyama9328b2c2016-03-14 23:16:09 +0000298 typedef typename ELFT::Shdr Elf_Shdr;
Simon Atanasyan1d7df402015-12-20 10:57:34 +0000299
300public:
Rafael Espindola042a3f22016-09-08 14:06:08 +0000301 MipsReginfoInputSection(ObjectFile<ELFT> *F, const Elf_Shdr *Hdr,
302 StringRef Name);
Rafael Espindola99558ef2016-10-26 18:44:57 +0000303 static bool classof(const InputSectionData *S);
Rui Ueyama70eed362016-01-06 22:42:43 +0000304
Simon Atanasyanadd74f32016-05-04 10:07:38 +0000305 const llvm::object::Elf_Mips_RegInfo<ELFT> *Reginfo = nullptr;
306};
307
308template <class ELFT>
309class MipsOptionsInputSection : public InputSectionBase<ELFT> {
310 typedef typename ELFT::Shdr Elf_Shdr;
311
312public:
Rafael Espindola042a3f22016-09-08 14:06:08 +0000313 MipsOptionsInputSection(ObjectFile<ELFT> *F, const Elf_Shdr *Hdr,
314 StringRef Name);
Rafael Espindola99558ef2016-10-26 18:44:57 +0000315 static bool classof(const InputSectionData *S);
Simon Atanasyanadd74f32016-05-04 10:07:38 +0000316
317 const llvm::object::Elf_Mips_RegInfo<ELFT> *Reginfo = nullptr;
Simon Atanasyan1d7df402015-12-20 10:57:34 +0000318};
319
Simon Atanasyan85c6b442016-08-12 06:28:49 +0000320template <class ELFT>
321class MipsAbiFlagsInputSection : public InputSectionBase<ELFT> {
322 typedef typename ELFT::Shdr Elf_Shdr;
323
324public:
Rafael Espindola042a3f22016-09-08 14:06:08 +0000325 MipsAbiFlagsInputSection(ObjectFile<ELFT> *F, const Elf_Shdr *Hdr,
326 StringRef Name);
Rafael Espindola99558ef2016-10-26 18:44:57 +0000327 static bool classof(const InputSectionData *S);
Simon Atanasyan85c6b442016-08-12 06:28:49 +0000328
329 const llvm::object::Elf_Mips_ABIFlags<ELFT> *Flags = nullptr;
330};
331
Rafael Espindolae0df00b2016-02-28 00:25:54 +0000332} // namespace elf
Michael J. Spencer84487f12015-07-24 21:03:07 +0000333} // namespace lld
334
335#endif