summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/PECOFF/Pass.cpp
blob: da6aa51544a5b12b5503ea366ffe787491fd485f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//===- lib/ReaderWriter/PECOFF/Pass.cpp -----------------------------------===//
//
//                             The LLVM Linker
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#include "Atoms.h"
#include "Pass.h"

#include "lld/Core/File.h"
#include "llvm/Support/COFF.h"

namespace lld {
namespace pecoff {

void addDir32NBReloc(COFFBaseDefinedAtom *atom, const Atom *target,
                     size_t offsetInAtom) {
  std::unique_ptr<COFFReference> ref(new COFFReference(
      target, offsetInAtom, llvm::COFF::IMAGE_REL_I386_DIR32NB));
  atom->addReference(std::move(ref));
}

} // end namespace pecoff
} // end namespace lld

OpenPOWER on IntegriCloud