2017-04-05 05:07:39 +00:00
|
|
|
//===- ScriptParser.h -------------------------------------------*- C++ -*-===//
|
|
|
|
//
|
2019-01-19 08:50:56 +00: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 05:07:39 +00:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLD_ELF_SCRIPT_PARSER_H
|
|
|
|
#define LLD_ELF_SCRIPT_PARSER_H
|
|
|
|
|
2017-10-02 21:00:41 +00:00
|
|
|
#include "lld/Common/LLVM.h"
|
2022-02-07 21:53:34 -08:00
|
|
|
#include "llvm/Support/MemoryBufferRef.h"
|
2017-04-05 05:07:39 +00:00
|
|
|
|
|
|
|
namespace lld {
|
|
|
|
namespace elf {
|
|
|
|
|
|
|
|
// Parses a linker script. Calling this function updates
|
2019-07-16 05:50:45 +00:00
|
|
|
// lld::elf::config and lld::elf::script.
|
2017-04-05 05:07:39 +00:00
|
|
|
void readLinkerScript(MemoryBufferRef mb);
|
|
|
|
|
|
|
|
// Parses a version script.
|
|
|
|
void readVersionScript(MemoryBufferRef mb);
|
|
|
|
|
|
|
|
void readDynamicList(MemoryBufferRef mb);
|
|
|
|
|
2017-11-04 02:03:58 +00:00
|
|
|
// Parses the defsym expression.
|
|
|
|
void readDefsym(StringRef name, MemoryBufferRef mb);
|
|
|
|
|
2020-06-17 17:11:38 -07:00
|
|
|
bool hasWildcard(StringRef s);
|
|
|
|
|
2017-04-05 05:07:39 +00:00
|
|
|
} // namespace elf
|
|
|
|
} // namespace lld
|
|
|
|
|
|
|
|
#endif
|