1 | //===- ScriptParser.h -------------------------------------------*- C++ -*-===// |
2 | // |
3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | // See https://llvm.org/LICENSE.txt for license information. |
5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | #ifndef LLD_ELF_SCRIPT_PARSER_H |
10 | #define LLD_ELF_SCRIPT_PARSER_H |
11 | |
12 | #include "lld/Common/LLVM.h" |
13 | #include "llvm/Support/MemoryBufferRef.h" |
14 | |
15 | namespace lld::elf { |
16 | |
17 | // Parses a linker script. Calling this function updates |
18 | // lld::elf::config and lld::elf::script. |
19 | void readLinkerScript(MemoryBufferRef mb); |
20 | |
21 | // Parses a version script. |
22 | void readVersionScript(MemoryBufferRef mb); |
23 | |
24 | void readDynamicList(MemoryBufferRef mb); |
25 | |
26 | // Parses the defsym expression. |
27 | void readDefsym(StringRef name, MemoryBufferRef mb); |
28 | |
29 | bool hasWildcard(StringRef s); |
30 | |
31 | } // namespace lld::elf |
32 | |
33 | #endif |
34 | |