forked from OSchip/llvm-project
[PECOFF] Remove unnecessary static member.
llvm-svn: 194851
This commit is contained in:
parent
ca9b0b6863
commit
94f2271d63
|
@ -150,35 +150,28 @@ namespace coff {
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
uint8_t FuncAtomContent[] = {
|
||||||
|
0xff, 0x25, 0x00, 0x00, 0x00, 0x00, // jmp *0x0
|
||||||
|
0x90, 0x90 // nop; nop
|
||||||
|
};
|
||||||
|
|
||||||
/// The defined atom for jump table.
|
/// The defined atom for jump table.
|
||||||
class FuncAtom : public COFFLinkerInternalAtom {
|
class FuncAtom : public COFFLinkerInternalAtom {
|
||||||
public:
|
public:
|
||||||
FuncAtom(const File &file, StringRef symbolName)
|
FuncAtom(const File &file, StringRef symbolName)
|
||||||
: COFFLinkerInternalAtom(file, std::vector<uint8_t>(rawContent),
|
: COFFLinkerInternalAtom(
|
||||||
symbolName) {}
|
file,
|
||||||
|
std::vector<uint8_t>(FuncAtomContent,
|
||||||
|
FuncAtomContent + sizeof(FuncAtomContent)),
|
||||||
|
symbolName) {}
|
||||||
|
|
||||||
virtual uint64_t ordinal() const { return 0; }
|
virtual uint64_t ordinal() const { return 0; }
|
||||||
virtual Scope scope() const { return scopeGlobal; }
|
virtual Scope scope() const { return scopeGlobal; }
|
||||||
virtual ContentType contentType() const { return typeCode; }
|
virtual ContentType contentType() const { return typeCode; }
|
||||||
virtual Alignment alignment() const { return Alignment(1); }
|
virtual Alignment alignment() const { return Alignment(1); }
|
||||||
virtual ContentPermissions permissions() const { return permR_X; }
|
virtual ContentPermissions permissions() const { return permR_X; }
|
||||||
|
|
||||||
private:
|
|
||||||
static std::vector<uint8_t> rawContent;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// MSVC doesn't seem to like C++11 initializer list, so initialize the
|
|
||||||
// vector from an array.
|
|
||||||
namespace {
|
|
||||||
uint8_t FuncAtomContent[] = {
|
|
||||||
0xff, 0x25, 0x00, 0x00, 0x00, 0x00, // jmp *0x0
|
|
||||||
0x90, 0x90 // nop; nop
|
|
||||||
};
|
|
||||||
} // anonymous namespace
|
|
||||||
|
|
||||||
std::vector<uint8_t> FuncAtom::rawContent(
|
|
||||||
FuncAtomContent, FuncAtomContent + sizeof(FuncAtomContent));
|
|
||||||
|
|
||||||
class FileImportLibrary : public File {
|
class FileImportLibrary : public File {
|
||||||
public:
|
public:
|
||||||
FileImportLibrary(const LinkingContext &context,
|
FileImportLibrary(const LinkingContext &context,
|
||||||
|
|
Loading…
Reference in New Issue