-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathelf.h
55 lines (49 loc) · 1.76 KB
/
elf.h
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
* CreateRemoteThread for Linux
*
* Copyright (c) 2018, ilammy
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*/
#ifndef LINUX_CRT_ELF_H
#define LINUX_CRT_ELF_H
struct library;
struct symbol_table;
/**
* find_dynamic_symbol_table() - locate the symbol table of an ELF image
* @library: mapping of memory regions of the shared object to scan
*
* Returns: a non-NULL allocated opaque symbol table on success, or NULL
* on errors or if the ELF image does not have a dynamic symbol table.
*
* The returned symbol table refers to the involved memory regions, so
* the memory regions must not be freed while the symbol table is in use.
*/
struct symbol_table* find_dynamic_symbol_table(struct library *mapping);
/**
* free_symbol_table() - free a symbol table
* @table: the table to be freed
*/
void free_symbol_table(struct symbol_table *table);
/**
* resolve_symbol() - resolve a remote symbol
* @name: symbol name to resolve
* @table: symbol table to use
*
* Returns: virtual address of the requested symbol, or zero if the symbol
* could not be resolved.
*/
unsigned long resolve_symbol(const char *name, struct symbol_table *table);
#endif /* LINUX_CRT_ELF_H */