RTEMS Linker
0.0.1
RTEMS Tools Project
|
Classes | |
struct | relocation |
class | reloc_offset_compare |
struct | osection |
struct | section |
struct | external |
struct | object |
class | image |
class | section_merge |
class | section_writer |
Typedefs | |
typedef std::vector< relocation > | relocations |
typedef std::map< const int, osection > | osections |
typedef std::vector< int > | osecindexes |
typedef std::list< external > | externals |
typedef std::list< object > | objects |
Enumerations | |
enum | sections { rap_text = 0, rap_const = 1, rap_ctor = 2, rap_dtor = 3, rap_data = 4, rap_bss = 5, rap_secs = 6 } |
Functions | |
const char * | section_name (int sec) |
uint32_t | align_offset (uint32_t offset, uint32_t size, uint32_t alignment) |
void | write (files::image &app, const std::string &init, const std::string &fini, const files::object_list &app_objects, const symbols::table &) |
typedef std::list< external > rld::rap::externals |
A container of externals.
typedef std::list< object > rld::rap::objects |
A container of objects.
typedef std::vector< int > rld::rap::osecindexes |
An ordered container of object section indexes. We need the same order so the alignments match up with the layout.
typedef std::map< const int, osection > rld::rap::osections |
Map of object file section offsets keyed by the object file section index. This is used when adding the external symbols so the symbol's value can be adjusted by the offset of the section in the RAP section.
typedef std::vector< relocation > rld::rap::relocations |
Relocation records.
enum rld::rap::sections |
uint32_t rld::rap::align_offset | ( | uint32_t | offset, |
uint32_t | size, | ||
uint32_t | alignment | ||
) |
Update the offset taking into account the alignment.
offset | The current offset. |
size | The size to move the offset by. |
alignment | The alignment of the offset. |
const char * rld::rap::section_name | ( | int | sec | ) |
Return the name of a section.
void rld::rap::write | ( | files::image & | app, |
const std::string & | init, | ||
const std::string & | fini, | ||
const files::object_list & | objects, | ||
const symbols::table & | symbols | ||
) |
Write a RAP format file.
The symbol table is provided to allow incremental linking at some point in the future. I suspect this will also require extra options being added to control symbol visibility in the RAP file. For example an "application" may be self contained and does not need to export any symbols therefore no symbols are added and the only ones are part of the relocation records to bind to base image symbols. Another case is the need for an application to export symbols because it is using dlopen to load modules. Here the symbols maybe 'all' or it could be a user maintained list that are exported.
app | The application image to write too. |
init | The application's initialisation entry point. |
fini | The application's finish entry point . |
objects | The list of object files in the application. |
symbols | The symbol table used to create the application. |