Giter Club home page Giter Club logo

elfhash's Introduction

elfhash

elfhash is a utility to manipulate hash table of ELF file.

#Features:

0, Architecture indepent, That means you can handle 32bit arm ELF in x86/x86_64 platform.

1, Convert GNU style hashtable in ELF to sysV style.

2, Rebuild sysv hashtable, if you change ELF dynamic symbols manually, you may need re-hash it.

3, Rename symbols to new name as same length. "The same length" is a limition: If new symbol name has different length, we need handle so many offset problem.

#Build:

$make

$sudo make install

It will install 'elfhash' to handle both 32bit and 64bit ELF.

#Usage:

$elfhash : convert gnu style hash to sysv style if it exists.

$elfhash -r : rebuild sysv hash.

$elfhash -f old_symbol -t new_symbol :rename old symbol name to new name

$elfhash -l : list the contents of elf

#NOTE:

!!!!!!!!!!!!!!!!!!!!!!!!!!!! DO not use it to manipulate system libraries, it is dangerous!!!!

#Thanks:

1.some codes come from PadicoTM project.

svn co svn://scm.gforge.inria.fr/svn/pm2/trunk

2.elf.h comes from elfutils without modifications.

elfhash's People

Contributors

cjacker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

elfhash's Issues

Let elfhash modify elf type EXECUTABLE as well as SHARED / DYNAMIC

Hi there. First thanks for writing this great tool! It has certainly helped me out of a spot of bother.

Can I suggest modifying elfhash so that it can manipulate EXECUTABLE (ET_EXEC) as well as SHARED (ET_DYN)?

The diffs would be as follows...

*************** int is_valid_elf64(char base)
*
* 355,361 ****
ehdr->e_ident[EI_MAG3] == 'F') ) {
return 0;
}
! if(ehdr->e_type != ET_DYN) {
return 0;
}
return 1;
--- 355,361 ----
ehdr->e_ident[EI_MAG3] == 'F') ) {
return 0;
}
! if((ehdr->e_type != ET_DYN) && (ehdr->e_type != ET_EXEC)) {
return 0;
}
return 1;

Thanks so much!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.