Rui Ueyama | 2ec3454 | 2017-04-05 05:07:39 +0000 | [diff] [blame] | 1 | //===- ScriptParser.h -------------------------------------------*- C++ -*-===// |
| 2 | // |
Chandler Carruth | 2946cd7 | 2019-01-19 08:50:56 +0000 | [diff] [blame] | 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 |
Rui Ueyama | 2ec3454 | 2017-04-05 05:07:39 +0000 | [diff] [blame] | 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #ifndef LLD_ELF_SCRIPT_PARSER_H |
| 10 | #define LLD_ELF_SCRIPT_PARSER_H |
| 11 | |
Rui Ueyama | 3f85170 | 2017-10-02 21:00:41 +0000 | [diff] [blame] | 12 | #include "lld/Common/LLVM.h" |
Rui Ueyama | 2ec3454 | 2017-04-05 05:07:39 +0000 | [diff] [blame] | 13 | #include "llvm/Support/MemoryBuffer.h" |
| 14 | |
| 15 | namespace lld { |
| 16 | namespace elf { |
| 17 | |
| 18 | // Parses a linker script. Calling this function updates |
Fangrui Song | 47cfe8f | 2019-07-16 05:50:45 +0000 | [diff] [blame] | 19 | // lld::elf::config and lld::elf::script. |
Rui Ueyama | 3837f42 | 2019-07-10 05:00:37 +0000 | [diff] [blame] | 20 | void readLinkerScript(MemoryBufferRef mb); |
Rui Ueyama | 2ec3454 | 2017-04-05 05:07:39 +0000 | [diff] [blame] | 21 | |
| 22 | // Parses a version script. |
Rui Ueyama | 3837f42 | 2019-07-10 05:00:37 +0000 | [diff] [blame] | 23 | void readVersionScript(MemoryBufferRef mb); |
Rui Ueyama | 2ec3454 | 2017-04-05 05:07:39 +0000 | [diff] [blame] | 24 | |
Rui Ueyama | 3837f42 | 2019-07-10 05:00:37 +0000 | [diff] [blame] | 25 | void readDynamicList(MemoryBufferRef mb); |
Rui Ueyama | 2ec3454 | 2017-04-05 05:07:39 +0000 | [diff] [blame] | 26 | |
Petr Hosek | 8c7e8cc | 2017-11-04 02:03:58 +0000 | [diff] [blame] | 27 | // Parses the defsym expression. |
Rui Ueyama | 3837f42 | 2019-07-10 05:00:37 +0000 | [diff] [blame] | 28 | void readDefsym(StringRef name, MemoryBufferRef mb); |
Petr Hosek | 8c7e8cc | 2017-11-04 02:03:58 +0000 | [diff] [blame] | 29 | |
Fangrui Song | 49279ca1 | 2020-06-17 17:11:38 -0700 | [diff] [blame] | 30 | bool hasWildcard(StringRef s); |
| 31 | |
Rui Ueyama | 2ec3454 | 2017-04-05 05:07:39 +0000 | [diff] [blame] | 32 | } // namespace elf |
| 33 | } // namespace lld |
| 34 | |
| 35 | #endif |