forked from KokoSoft/Programmer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.cpp
More file actions
37 lines (29 loc) · 719 Bytes
/
Main.cpp
File metadata and controls
37 lines (29 loc) · 719 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
34
35
36
37
// SPDX-License-Identifier: BSD-3-Clause
//
// Copyright(c) 2023 Koko Software. All rights reserved.
//
// Author: Adrian Warecki <embedded@kokosoftware.pl>
#include <iostream>
#include "Elf.hpp"
int main(int argc, char** argv) {
try {
std::cout << "Hello World! " << argc << "\n";
if (1)
{
elf::Elf elf("sample_library");
//Elf elf("dsp_lib_example_lib_mtl_release");
//elf.print();
elf::StringsTable strtab;
elf.read_section(strtab, ".strtab");
elf::SymbolTable symtab;
elf.read_section(symtab, ".symtab");
strtab.print();
symtab.print(&strtab);
}
}
catch (std::exception& err) {
//::SetConsoleOutputCP(CP_UTF8);
printf("Error: %s\n", err.what());
}
return 0;
}