summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibELF/DynamicLinker.h
blob: e9a87fa981a4ba63ee2b6b332141c14e31fcfd11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*
 * Copyright (c) 2021, the SerenityOS developers.
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#pragma once

#include <AK/Result.h>
#include <AK/Vector.h>
#include <LibELF/DynamicObject.h>

namespace ELF {

class DynamicLinker {
public:
    static Optional<DynamicObject::SymbolLookupResult> lookup_global_symbol(const StringView& symbol);
    [[noreturn]] static void linker_main(String&& main_program_name, int fd, bool is_secure, int argc, char** argv, char** envp);

private:
    DynamicLinker() = delete;
    ~DynamicLinker() = delete;
};

}