Age | Commit message (Collapse) | Author |
|
This allows resued for other parts of the system not dependent on
objcet files or archives.
|
|
Remove some warnings.
|
|
1. align to even address
2. Fix the use of GElf_Ehdr and Elf32_Ehdr
3. Fix the header related
|
|
Signed-off-by: Peng Fan <van.freenix@gmail.com>
|
|
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.
|
|
Add a method to return a section given the ELF section index.
Add more trace output for debugging.
|
|
|
|
These changes implement a suitable relocation output in the image.
The code is still not working 100% but these changes are a big
improvement.
|
|
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.
|
|
The index is referenced in the symbol and relocation records of ELF files
therefore we need to search for them.
|
|
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.
|
|
|
|
Fix the finding of a file name in the GNU extension for long names
in GNU archives so the correct location is referenced.
Made the image read and write routines keep reading if not all the
requested data is read or written due to possible signals.
|
|
This also adds support to the ELF classes that wrap libelf. While
this is now done and seems to work I will not be using an ELF
file to hold the metadata after all.
|
|
|
|
|
|
The refactoring allows better reuse of the ELF support and cleans up
some hacks from the generic file and archive handling improving the
separation of the file handling from the file format, ie ELF. The
handling of ELF object files and ELF object files inside archives
is cleaner.
The refactor cleaned up the symbol handling where the symbols now
reside in the ELF file object and references are take in symbol
pointer containers and symbol table containers.
The main purpose of the refactor is to allow support for creating
and writing ELF files.
Also added an rtems-syms command where special symbol support
can be added.
|
|
|