Skip to content

hladik-dan/LibElf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

LibElf

LibElf is C++ library for simple manipulation with ELF files.


Examples

Load data from file

#include "lib_elf.h"

LibElf::LibElf lib_elf;
if (!lib_elf.load("filename"))
    return false;

Get data ``` cpp LibElf::ElfIdentification *elf_identification = lib_elf.get_elf_identification();

std::cout << elf_identification->get_version() << std::endl; // Output: 1

std::cout << elf_identification->get_version_string() << std::endl; // Output: Current Version

<br />
Set data
``` cpp
LibElf::ElfIdentification *elf_identification = lib_elf.get_elf_identification();

std::cout << elf_identification->get_version() << std::endl;
// Output: 1

// Set version to 0
elf_identification->set_version(0);

std::cout << elf_identification->get_version() << std::endl;
// Output: 0

Check data ``` cpp LibElf::ElfIdentification *elf_identification = lib_elf.get_elf_identification();

std::cout << elf_identification->get_version() << std::endl; // Output: 1

bool ok_1 = elf_identification->check_version(); // ok_1 = true

// Set version to 0 elf_identification->set_version(0);

bool ok_2 = elf_identification->check_version(); // ok_2 = false

About

Library for editing ELF files.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published