-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTester.cpp
More file actions
33 lines (25 loc) · 770 Bytes
/
Tester.cpp
File metadata and controls
33 lines (25 loc) · 770 Bytes
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
#include <stdio.h>
#include "ElfParser.h"
int main(int argc, char *argv[])
{
//ElfParser::tsELFHeaderInfo stResult;
//ElfParser::Parse("Test.o", &stResult);
//ElfParser::PrintHeaderInfo(stResult);
if(argc < 2)
{
printf("Wrong usage. Example: $./Tester ElfFileToParse.o\n");
return -1;
}
ElfParser TestInstance("Test.o");
TestInstance.ParseHeader();
TestInstance.PrintHeaderInfo();
TestInstance.ParseAllSections();
TestInstance.PrintAllSectionHeaderInfo();
printf("\nSymbol Section is: %d", TestInstance.unSymbolSectionID);
printf("\nSymbol Count: %d", TestInstance.unSymbolCount);
printf("\nString Section is: %d", TestInstance.unStrtabSectionID);
TestInstance.ParseAllSymbols();
TestInstance.PrintAllSymbolInfo();
printf("\n");
return 0;
}