2017-04-05 13:07:39 +08:00
|
|
|
//===- ScriptParser.h -------------------------------------------*- C++ -*-===//
|
|
|
|
//
|
2019-01-19 16:50:56 +08:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2017-04-05 13:07:39 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLD_ELF_SCRIPT_PARSER_H
|
|
|
|
#define LLD_ELF_SCRIPT_PARSER_H
|
|
|
|
|
2017-10-03 05:00:41 +08:00
|
|
|
#include "lld/Common/LLVM.h"
|
2017-04-05 13:07:39 +08:00
|
|
|
#include "llvm/Support/MemoryBuffer.h"
|
|
|
|
|
|
|
|
namespace lld {
|
|
|
|
namespace elf {
|
|
|
|
|
|
|
|
// Parses a linker script. Calling this function updates
|
2019-07-16 13:50:45 +08:00
|
|
|
// lld::elf::config and lld::elf::script.
|
2017-04-05 13:07:39 +08:00
|
|
|
void readLinkerScript(MemoryBufferRef mb);
|
|
|
|
|
|
|
|
// Parses a version script.
|
|
|
|
void readVersionScript(MemoryBufferRef mb);
|
|
|
|
|
|
|
|
void readDynamicList(MemoryBufferRef mb);
|
|
|
|
|
2017-11-04 10:03:58 +08:00
|
|
|
// Parses the defsym expression.
|
|
|
|
void readDefsym(StringRef name, MemoryBufferRef mb);
|
|
|
|
|
2017-04-05 13:07:39 +08:00
|
|
|
} // namespace elf
|
|
|
|
} // namespace lld
|
|
|
|
|
|
|
|
#endif
|