16 Commits

Author SHA1 Message Date
Chris Johns
f31cded659 Improved section trace output.
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-23 17:45:34 +11:00
Chris Johns
6c28ffbf01 Set header length. Make sections public.
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-21 17:10:18 +11:00
Chris Johns
b2b811cbc7 Fixes to load libbsdports on i386.
Numerous fixes to load the the libbsdport RAP file on the i386.
2012-12-18 20:57:00 +11:00
Chris Johns
f10123a72f Const sections are not PROGBITS and ALLOC and not EXECINTR or WRITE. 2012-12-15 23:30:46 +11:00
Chris Johns
d54e81c971 Debug trace changes. 2012-12-15 23:19:21 +11:00
Chris Johns
b89ad2c6cb i386 related fixes
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-15 22:44:58 +11:00
Chris Johns
f4d580bc73 Add the section offset to the symbol value. 2012-12-13 10:07:32 +11:00
Chris Johns
42f766f0ca Relocation fixes.
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-12 21:51:03 +11:00
Chris Johns
90d8d43e4b Add support to demand load relocation records.
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-08 09:07:30 +11:00
Chris Johns
825a10ea70 The symbol string is the offset into the symbol table. 2012-12-01 21:22:24 +11:00
Chris Johns
9ba89e17b0 Remove the trace on hack. 2012-12-01 08:09:02 +11:00
Chris Johns
803c60a946 RAP format up to relocation records completed.
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-12-01 08:05:47 +11:00
Chris Johns
1a5bdef7a5 Add support for a custom RAP file format.
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-29 19:05:19 +11:00
Chris Johns
dc1c7447a4 Add machine related data to allow better checking. 2012-11-27 11:19:15 +11:00
Chris Johns
ae353d3bb0 Comment clean up. 2012-11-26 11:50:21 +11:00
Chris Johns
eb825b1deb Add RAP format support. 2012-11-26 11:09:35 +11:00