Age | Commit message (Collapse) | Author | |
---|---|---|---|
2013-06-24 | PHDR addition. Should make x86-64 work in many cases. | norly | |
2013-06-24 | mLayoutAuto: Do not move LOAD segments, and update PHDR PHDR | norly | |
2013-06-24 | Reorder PHDRs according to ELF spec | norly | |
2013-06-24 | mLayoutGetSpaceInPhdr: Use mPhdrLoadLowestHighest | norly | |
2013-06-24 | PHDR: Find lowest/highest addr/offs | norly | |
2013-06-22 | reladd: Work more with sh_addr instead of sh_offset | norly | |
2013-06-22 | Minor fixes to PHDR expansion to lower addresses | norly | |
2013-06-22 | PHDR: find by addr/offset | norly | |
2013-06-21 | Use .rela.plt too - need this for x86-64c90 | norly | |
2013-06-21 | mFromFile: Initialize *me | norly | |
2013-06-21 | Minor cleanup in reladd, 2nd pass | norly | |
2013-06-21 | Merge cloneScn() into reladd.c | norly | |
It's the only place where we use it, and it's case-specific | |||
2013-06-21 | LOAD PHDRs at top level, others as children. mPhdrForall(). | norly | |
The reference binaries had to be updated as PHDRs are now reordered. | |||
2013-06-20 | Add Elf/Phdr/Scn alloc/destroy | norly | |
2013-06-20 | Extend relocation parser to full 32/64 bits | norly | |
2013-06-20 | Cleaner ElfuPhdr alloc | norly | |
2013-06-20 | Clean up code using ElfuScn | norly | |
2013-06-20 | Separate library code, build .a/.so | norly | |
2013-06-18 | Basic detour support | norly | |
2013-06-17 | C90 compliance, except variadic macros and TODOs | norly | |
Also removed a lot of dead code from the early days. | |||
2013-06-16 | mv main.c -> elfucli.c, make it scriptable via argssymrel | norly | |
2013-06-16 | Clean up main.c a bit | norly | |
2013-06-15 | Factor out symbol table handling | norly | |
2013-06-15 | Rename mRelocate | norly | |
2013-06-15 | Basic x86-64 support, not very usable in practice | norly | |
Turns out that x86-64 aligns LOAD segments to 0x200000 bytes. Given that the mapping starts at 0x400000, there is not much room to expand... so there will be a need to add additional LOAD headers. | |||
2013-06-15 | Merge 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-15 | Flatten symtab to file - gdb works, check breaks. | norly | |
2013-06-15 | Make symtab and reltab resident in ElfuScn | norly | |
2013-06-12 | Rename elfedit to centaur, model to modelops | norly | |
2013-06-03 | Do not insert STRTAB sections explicitly | norly | |
2013-06-03 | Insert NOBITS sections (.bss), ignore empty sections | norly | |
2013-06-03 | Guess where unknown functions are in .rel.plt | norly | |
2013-06-03 | Disable memory dump to screen | norly | |
2013-06-03 | Basic 32-bit SYMTAB and REL (not RELA) support | norly | |
2013-06-03 | Simplify includes | norly | |
2013-06-01 | Insert section names (with fixed prefix) | norly | |
Ideally, the filename of the original .o file being inserted would be used as a prefix for the sections copied over. However for now that prefix is simply "reladd". | |||
2013-05-31 | Auto-layout file after --reladd | norly | |
2013-05-31 | Pull out existing re-layouting code | norly | |
2013-05-30 | More rigorous sh_addr and sh_offset checking | norly | |
2013-05-30 | Redesign data structures, make basic reladd work.newparser | norly | |
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-28 | Implement orphaned sections | norly | |
Orphaned sections are not (fully) included in any LOAD PHDR and can thus be moved and stripped at will without changing the memory image of the program. | |||
2013-05-28 | Remove old and ugly printing functions | norly | |
2013-05-28 | Add printing functions for models to ease debugging | norly | |
2013-05-27 | Find PHDR -> PHDR dependencies | norly | |
2013-05-27 | Only establish PHDR->Scn relationship for PT_LOAD | norly | |
2013-05-27 | Restrict sh_link/sh_info evaluation where possible | norly | |
2013-05-27 | Abstract model more - break 'make check' | norly | |
Sections are now sorted by file offset and sh_link dependencies between them as well as PHDR-SHDR dependencies are deduced as much as possible. The downside is that while the output should still work just fine, 'make check' fails to establish binary equivalence of input and output if the section table is reordered. Thankfully, in normal GCC binaries it is already ordered so we don't have to worry about this. Unfortunately the ELF spec is very lax in this regard so we have to draw a line ourselves. | |||
2013-05-27 | Turn elfu_gPhdrContainsScn into a macro | norly | |
2013-05-27 | Turn elfu_gScnSizeFile into a macro | norly | |
2013-05-27 | Clean up loader code | norly | |