summaryrefslogtreecommitdiff
path: root/include/libelfu/modelops.h
AgeCommit message (Collapse)Author
2013-06-28Annotate doxygen-styledoxygennorly
2013-06-27Allocate .symtab during Reladd if none presentcleanupnorly
2013-06-27Lookup dynamically linked global variables.norly
This works ONLY in position-dependent executables. Processing position-independent code includes generating and inserting code that finds out the current instruction address. That's beyond the scope of editing normal executables, which are usually position-dependent unless requested otherwise.
2013-06-26Separate PLT lookupnorly
2013-06-24PHDR: Find lowest/highest addr/offsnorly
2013-06-22PHDR: find by addr/offsetnorly
2013-06-21Merge cloneScn() into reladd.cnorly
It's the only place where we use it, and it's case-specific
2013-06-21LOAD PHDRs at top level, others as children. mPhdrForall().norly
The reference binaries had to be updated as PHDRs are now reordered.
2013-06-20Add Elf/Phdr/Scn alloc/destroynorly
2013-06-20Cleaner ElfuPhdr allocnorly
2013-06-20Clean up code using ElfuScnnorly
2013-06-18Basic detour supportnorly
2013-06-15Factor out symbol table handlingnorly
2013-06-15Rename mRelocatenorly
2013-06-15Merge symbol tables. (Not fully ELF conformant)norly
Also, remove that nameptr member from symbols. It just *had* to cause trouble. Symbols are simply appended to the target's symbol table, which means that LOCAL symbols are not inserted at the beginning and we are thus ignoring an ELF spec. Might change that in the future, it's good enough for now and it's sure not to break anything with the old symbols. The code currently assumes that the target *has* a symbol table. We'll have to fix that, and also remove undefined and duplicate symbols.
2013-06-03Basic 32-bit SYMTAB and REL (not RELA) supportnorly
2013-06-03Simplify includesnorly
2013-05-31Auto-layout file after --reladdnorly
2013-05-31Pull out existing re-layouting codenorly
2013-05-30Redesign data structures, make basic reladd work.newparsernorly
The memory ELF model is now a tree structure: ELF +--> PHDRs +--> PHDR +--> Section | | +--> Section | | ... | | \--> Section | | | +--> PHDR +--> Section | | ... | ... | \--> Orphaned sections +--> Section ... \--> Section This effectively introduces semantics into the binary blob we are editing, and allows us to re-layout its contents much more easily while keeping as close as possible to what is assumed to be the original semantics. As a side-effect, a first meta-function had to be introduced (elfu_mScnForall) in order to traverse all leaves of the tree. Much old code has been removed given the leaner environment available now, and automated insertion of .text and .data sections from object files into executables now works. However nothing else is inserted (such as string tables or .bss) and no relocation takes place yet.
2013-05-28Add printing functions for models to ease debuggingnorly
2013-05-24Object file injection, first partnorly
2013-05-24Use explicit libelf/* path in includesnorly
2013-03-21NOBITS expansion, for .bss etcnorly
GNU binutils' readelf gets confused with symbol versions. More analysis needed on that.
2013-03-01Implement mInsertAfter, for post-.data injectionnorly
2013-02-27Implement mInsertBefore, for pre-.interp injectionnorly
2013-02-23Refactor mdoel-related codenorly