FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
elf-parser/elf-parser.h at master · TheCodeArtist/elf-parser · GitHub
TheCodeArtist
/
elf-parser
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
47
Star
161
Code
Issues
5
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
elf-parser
/
elf-parser.h
Copy path
More file actions
More file actions
Latest commit
History
History
History
52 lines (44 loc) · 1.73 KB
Breadcrumbs
elf-parser
/
elf-parser.h
Copy path
File metadata and controls
52 lines (44 loc) · 1.73 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
#ifndef
ELF_PARSER_H
#define
ELF_PARSER_H
#include
<stdio.h>
#include
<assert.h>
#include
<fcntl.h>
#include
<stdlib.h>
#include
<unistd.h>
#include
<string.h>
#include
<errno.h>
#include
<stdbool.h>
#include
<stdint.h>
#include
<inttypes.h>
/* for PRIx64 and PRIu64 */
#include
<elf.h>
#define
DEBUG
1
#define
debug
(...) \
do { if (DEBUG) printf("<debug>:"__VA_ARGS__); } while (0)
#ifdef
__cplusplus
extern
"C"
{
#endif
void
disassemble
(
int
fd
,
Elf32_Ehdr
eh
,
Elf32_Shdr
*
sh_tbl
);
void
disassemble64
(
int
fd
,
Elf64_Ehdr
eh
,
Elf64_Shdr
*
sh_tbl
);
void
read_elf_header64
(
int
fd
,
Elf64_Ehdr
*
elf_header
);
bool
is_ELF64
(
Elf64_Ehdr
eh
);
void
print_elf_header64
(
Elf64_Ehdr
elf_header
);
void
read_section_header_table64
(
int
fd
,
Elf64_Ehdr
eh
,
Elf64_Shdr
sh_table
[]);
char
*
read_section64
(
int
fd
,
Elf64_Shdr
sh
);
void
print_section_headers64
(
int
fd
,
Elf64_Ehdr
eh
,
Elf64_Shdr
sh_table
[]);
void
print_symbol_table64
(
int
fd
,
Elf64_Ehdr
eh
,
Elf64_Shdr
sh_table
[],
uint32_t
symbol_table
);
void
print_symbols64
(
int
fd
,
Elf64_Ehdr
eh
,
Elf64_Shdr
sh_table
[]);
void
save_text_section64
(
int
fd
,
Elf64_Ehdr
eh
,
Elf64_Shdr
sh_table
[]);
void
read_elf_header
(
int
fd
,
Elf32_Ehdr
*
elf_header
);
bool
is_ELF
(
Elf32_Ehdr
eh
);
void
print_elf_header
(
Elf32_Ehdr
elf_header
);
void
read_section_header_table
(
int
fd
,
Elf32_Ehdr
eh
,
Elf32_Shdr
sh_table
[]);
char
*
read_section
(
int
fd
,
Elf32_Shdr
sh
);
void
print_section_headers
(
int
fd
,
Elf32_Ehdr
eh
,
Elf32_Shdr
sh_table
[]);
void
print_symbol_table
(
int
fd
,
Elf32_Ehdr
eh
,
Elf32_Shdr
sh_table
[],
uint32_t
symbol_table
);
void
print_symbols
(
int
fd
,
Elf32_Ehdr
eh
,
Elf32_Shdr
sh_table
[]);
void
save_text_section
(
int
fd
,
Elf32_Ehdr
eh
,
Elf32_Shdr
sh_table
[]);
bool
is64Bit
(
Elf32_Ehdr
eh
);
#ifdef
__cplusplus
}
#endif
#endif
/* ELF_PARSER_H */
Back
|
FazBrowse Home
|
New Git URL