summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-01-23Update the documentationChris Johns
2013-01-22Documentation.Chris Johns
2013-01-15Fixed the layout output to give to all the needed detail.Chris Johns
2013-01-01Use find_in_strtab when collecting symbols. Remove debug.Chris Johns
2012-12-31Sort the relocation records by offset for a section.Chris Johns
2012-12-31Make layout offsets match image offsets. Add a better strtab search.Chris Johns
The offsets of sections in objects have to be computed in load order so the offsets work. For example an object could have a sections with an alignment of 4 and 16 so the 4 may align with the current load offset and the 16 is padded to align it. This is the way the image is loaded and so the layout needs to follow these rules. The strtab search needs to be better. An STL string find was finding patrial strings and causing errors on the target.
2012-12-31Sort the relocations by offset to make the overlay work.Chris Johns
2012-12-29Fix managing weak symbols.Chris Johns
Weak symbols where not being managed correctly. The symbols table is now a class with externals and weaks as separate symtabs so the externals can be searched first then the weaks and if not found an unresolved error is raised. This was found creating a libbsdport RAP file where the drivers in the all driver table resolved to the weak symbols and so linking in nothing. Fixing the weak symbols as found in the libbsdport library triggered a new resolver bug. The object files now contain the resolver state and this is used to determine if an object file has been resolved or is currently being resolved avoiding rescursive loops with dependent object files. The resolver trace output is a little easier to read.
2012-12-24Add the symsect offset to the section reloc.Chris Johns
2012-12-24Trace the reloc addend.Chris Johns
2012-12-23Improved section trace output.Chris Johns
Moved the section trace output to after the offsets have been computed and add this to the output. This allows a simple way to track the offset in an ELF section to the offset in the RAP section.
2012-12-23Change the long opt from map to overlay.Chris Johns
2012-12-23Add an overlay output.Chris Johns
An overlay shows the hex dump of the section data with the relocation records so you can see the relationship between the relocations and the section data.
2012-12-23Add a memory dump utility.Chris Johns
2012-12-21Fix the reloc symbol name.Chris Johns
2012-12-21Finish a dump of the RAP file. Fix expanding.Chris Johns
2012-12-21Set header length. Make sections public.Chris Johns
Set the compressed file length in the RAP header. Move the string from the outputter to the RAP file. Make the sections public by moving to the RAP header.
2012-12-21Decompressor fixes.Chris Johns
Make reading compressed files more robust returning the amount of data that can be read. Also add >> operartors to get the data. Add exceptions when a read fails.
2012-12-19Turn off the debug.Chris Johns
2012-12-19RAP file utility. Decompressors RAP files.Chris Johns
2012-12-19Decompression support added.Chris Johns
The compressor can now decompress LZ77 files.
2012-12-18Fixes to load libbsdports on i386.Chris Johns
Numerous fixes to load the the libbsdport RAP file on the i386.
2012-12-18 Add object::get_section.Chris Johns
Add a method to return a section given the ELF section index. Add more trace output for debugging.
2012-12-18Use cerr for errors and not cout.Chris Johns
2012-12-18Update the data out pointer.Chris Johns
The data pointer was not updating when looping. Fix the total stats to track the data in the buffer.
2012-12-18Add a new trace level.Chris Johns
2012-12-15Const sections are not PROGBITS and ALLOC and not EXECINTR or WRITE.Chris Johns
2012-12-15Debug trace changes.Chris Johns
2012-12-15i386 related fixesChris Johns
Fix the size of the section calculated in image::lay_out. It did not correctly adjust for alignment. Make the sections being written correctly align.
2012-12-13Add the section offset to the symbol value.Chris Johns
2012-12-12Relocation fixes.Chris Johns
These changes implement a suitable relocation output in the image. The code is still not working 100% but these changes are a big improvement.
2012-12-08Add support to demand load relocation records.Chris Johns
Support has been added to load relocation record on demand. The relocation records are not read when the object file is first opened and read. They are read only when being written to the output file. This save loading lots of records into memory from libraries to be thrown away. The RAP format now supports writing out relocation records.
2012-12-08Add doxygen support.Chris Johns
2012-12-01The symbol string is the offset into the symbol table.Chris Johns
2012-12-01Remove the trace on hack.Chris Johns
2012-12-01RAP format up to relocation records completed.Chris Johns
Do not write the script into the RAP file rather just write the init and fini labels. These are appended to the string table and offsets in the string table added to the image. Fi the sizes so the sections can be correctly loaded on the target.
2012-11-29Add support for a custom RAP file format.Chris Johns
The file is a header and a searies of LZ77 blocks which hold the application. The format allows for easy streaming and loading on the target without needing the rewind or seek around the file.
2012-11-29Compress as blocks.Chris Johns
The LZ77 compressor works with blocks. Each block is prefixed with a header that defines the output size of the block being compressed.
2012-11-29Remove the \0 character after the header.Chris Johns
2012-11-29Add the index to the section.Chris Johns
The index is referenced in the symbol and relocation records of ELF files therefore we need to search for them.
2012-11-29Add access to the value and info fields of a symbols.Chris Johns
2012-11-27Add machine related data to allow better checking.Chris Johns
2012-11-27Remove size_t stream operator.Chris Johns
On Darwin the operator works which on CentOS and FreeBSD it is seen to be redefining the uint32_t stream operator. Too hard to provide a generic solution so just cast in the user code.
2012-11-26Update to the latest framwork requirements.Chris Johns
2012-11-26Comment clean up.Chris Johns
2012-11-26Add RAP format support.Chris Johns
2012-11-26Updated to reflect the framework changes.Chris Johns
2012-11-26Add exit label, ELF application and Application.Chris Johns
Add an exit label that is called when removing an application. Change the "applicatiion" to "elf_application" and add a custom format called the RAP format for applications.
2012-11-26Add writing from images as well as streaming operators.Chris Johns
Add the ability to write to the compressed stream directly from files::images. Add streaming operator support which is always in a standard byte format in the output image.
2012-11-26No archive begin/end on symbols load, image initialise fix, add sections.Chris Johns
Remove archive_begin/archive_end calls when loading symbols. The symbols reference object files and they may reference archive and so the archives need to be open and available. The archive begin/end must be handled at a higher level in the program. Fixed image initialisation where some constructors did not initialise all class variables. Add section support to the rld::files namespace. This allows section information to be added to an object file without the ELF file needing to available therefore removing the need for object file remaining open all the time. These sections are a copy of the information and can be copied and moved as needed. This is used to make layouts.