forked from OSchip/llvm-project
Move the parser for the linker script to a separate file.
LinkerScript.cpp contains both the linker script processor and the linker script parser. I put both into a single file, but the file grown too large, so it's time to put them into two different files. llvm-svn: 299515
This commit is contained in:
parent
fd9dafdc65
commit
2ec34544aa
|
|
@ -24,6 +24,7 @@ add_lld_library(lldELF
|
|||
OutputSections.cpp
|
||||
Relocations.cpp
|
||||
ScriptLexer.cpp
|
||||
ScriptParser.cpp
|
||||
Strings.cpp
|
||||
SymbolTable.cpp
|
||||
Symbols.cpp
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
#include "LinkerScript.h"
|
||||
#include "Memory.h"
|
||||
#include "OutputSections.h"
|
||||
#include "ScriptParser.h"
|
||||
#include "Strings.h"
|
||||
#include "SymbolTable.h"
|
||||
#include "Target.h"
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -57,15 +57,6 @@ struct ExprValue {
|
|||
// Later, we evaluate the expression by calling the function.
|
||||
typedef std::function<ExprValue()> Expr;
|
||||
|
||||
// Parses a linker script. Calling this function updates
|
||||
// Config and ScriptConfig.
|
||||
void readLinkerScript(MemoryBufferRef MB);
|
||||
|
||||
// Parses a version script.
|
||||
void readVersionScript(MemoryBufferRef MB);
|
||||
|
||||
void readDynamicList(MemoryBufferRef MB);
|
||||
|
||||
// This enum is used to implement linker script SECTIONS command.
|
||||
// https://sourceware.org/binutils/docs/ld/SECTIONS.html#SECTIONS
|
||||
enum SectionsCommandKind {
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,31 @@
|
|||
//===- ScriptParser.h -------------------------------------------*- C++ -*-===//
|
||||
//
|
||||
// The LLVM Linker
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLD_ELF_SCRIPT_PARSER_H
|
||||
#define LLD_ELF_SCRIPT_PARSER_H
|
||||
|
||||
#include "lld/Core/LLVM.h"
|
||||
#include "llvm/Support/MemoryBuffer.h"
|
||||
|
||||
namespace lld {
|
||||
namespace elf {
|
||||
|
||||
// Parses a linker script. Calling this function updates
|
||||
// Config and ScriptConfig.
|
||||
void readLinkerScript(MemoryBufferRef MB);
|
||||
|
||||
// Parses a version script.
|
||||
void readVersionScript(MemoryBufferRef MB);
|
||||
|
||||
void readDynamicList(MemoryBufferRef MB);
|
||||
|
||||
} // namespace elf
|
||||
} // namespace lld
|
||||
|
||||
#endif
|
||||
Loading…
Reference in New Issue