Coverage Report

Created: 2017-09-19 22:28

/Users/buildslave/jenkins/sharedspace/clang-stage2-coverage-R@2/llvm/tools/lld/ELF/Writer.h
Line
Count
Source
1
//===- Writer.h -------------------------------------------------*- C++ -*-===//
2
//
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
10
#ifndef LLD_ELF_WRITER_H
11
#define LLD_ELF_WRITER_H
12
13
#include "llvm/ADT/ArrayRef.h"
14
#include "llvm/ADT/StringRef.h"
15
#include <cstdint>
16
#include <memory>
17
18
namespace lld {
19
namespace elf {
20
class InputFile;
21
class OutputSection;
22
class InputSectionBase;
23
template <class ELFT> class ObjFile;
24
class SymbolTable;
25
template <class ELFT> void writeResult();
26
template <class ELFT> void markLive();
27
28
// This describes a program header entry.
29
// Each contains type, access flags and range of output sections that will be
30
// placed in it.
31
struct PhdrEntry {
32
10.1k
  PhdrEntry(unsigned Type, unsigned Flags) : p_type(Type), p_flags(Flags) {}
33
  void add(OutputSection *Sec);
34
35
  uint64_t p_paddr = 0;
36
  uint64_t p_vaddr = 0;
37
  uint64_t p_memsz = 0;
38
  uint64_t p_filesz = 0;
39
  uint64_t p_offset = 0;
40
  uint32_t p_align = 0;
41
  uint32_t p_type = 0;
42
  uint32_t p_flags = 0;
43
44
  OutputSection *FirstSec = nullptr;
45
  OutputSection *LastSec = nullptr;
46
  bool HasLMA = false;
47
};
48
49
llvm::StringRef getOutputSectionName(llvm::StringRef Name);
50
51
template <class ELFT> uint32_t getMipsEFlags();
52
53
uint8_t getMipsFpAbiFlag(uint8_t OldFlag, uint8_t NewFlag,
54
                         llvm::StringRef FileName);
55
56
bool isMipsN32Abi(const InputFile *F);
57
} // namespace elf
58
} // namespace lld
59
60
#endif