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