Skip to content

Commit f6a7853

Browse files
authored
update readme
1 parent 27be7a7 commit f6a7853

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ No dependencies
99
## Sections (readelf -S executable)
1010
parse sections header table from elf binary and return vector of section_t below
1111

12-
```
12+
```cpp
1313
typedef struct {
1414
int section_index = 0;
1515
std::intptr_t section_offset, section_addr;
@@ -21,7 +21,7 @@ typedef struct {
2121

2222
get elf sections using elf-parser
2323

24-
```
24+
```cpp
2525
#include <elf-parser.h>
2626
elf_parser::Elf_parser elf_parser(executable_path);
2727
std::vector<elf_parser::section_t> secs = elf_parser.get_sections();
@@ -31,7 +31,7 @@ see [example](examples/sections.cc)
3131
## Segments (readelf -l executable)
3232
parse program header table from elf binary and return vector of segment_t below
3333
34-
```
34+
```cpp
3535
typedef struct {
3636
std::string segment_type, segment_flags;
3737
long segment_offset, segment_virtaddr, segment_physaddr, segment_filesize, segment_memsize;
@@ -41,7 +41,7 @@ typedef struct {
4141

4242
get elf segments using elf-parser
4343

44-
```
44+
```cpp
4545
#include <elf-parser.h>
4646
elf_parser::Elf_parser elf_parser(executable_path);
4747
std::vector<elf_parser::segment_t> segs = elf_parser.get_segments();
@@ -51,7 +51,7 @@ see [example](examples/segments.cc)
5151
## Symbols (readelf -s executable)
5252
parse symbols table from elf binary and return vector of symbol_t below
5353
54-
```
54+
```cpp
5555
typedef struct {
5656
std::string symbol_index;
5757
std::intptr_t symbol_value;
@@ -62,7 +62,7 @@ typedef struct {
6262

6363
get elf symbols using elf-parser
6464

65-
```
65+
```cpp
6666
#include <elf-parser.h>
6767
elf_parser::Elf_parser elf_parser(executable_path);
6868
std::vector<elf_parser::symbol_t> syms = elf_parser.get_symbols();
@@ -72,7 +72,7 @@ see [example](examples/symbols.cc)
7272
## Relocations (readelf -r executable)
7373
parse relocations with plt address from elf binary and return vector of relocation_t below
7474
75-
```
75+
```cpp
7676
typedef struct {
7777
std::intptr_t relocation_offset, relocation_info, relocation_symbol_value;
7878
std::string relocation_type, relocation_symbol_name, relocation_section_name;
@@ -82,7 +82,7 @@ typedef struct {
8282

8383
get elf relocations using elf-parser
8484

85-
```
85+
```cpp
8686
#include <elf-parser.h>
8787
elf_parser::Elf_parser elf_parser(executable_path);
8888
std::vector<elf_parser::relocation_t> relocs = elf_parser.get_relocations();

0 commit comments

Comments
 (0)