|
RTEMS Linker
0.0.1
RTEMS Tools Project
|
#include <rld-files.h>
Public Member Functions | |
| image (file &name) | |
| image (const std::string &path, bool is_object=true) | |
| image () | |
| virtual | ~image () |
| virtual void | open (file &name) |
| virtual void | open (bool writable=false) |
| virtual void | close () |
| virtual ssize_t | read (void *buffer, size_t size) |
| virtual ssize_t | write (const void *buffer, size_t size) |
| virtual void | seek (off_t offset) |
| virtual bool | seek_read (off_t offset, uint8_t *buffer, size_t size) |
| virtual bool | seek_write (off_t offset, const void *buffer, size_t size) |
| const file & | name () const |
| virtual int | references () const |
| virtual size_t | size () const |
| virtual int | fd () const |
| elf::file & | elf () |
| virtual void | symbol_referenced () |
| virtual int | symbol_references () const |
| const std::string | path () const |
| bool | is_open () const |
| bool | is_writable () const |
Image is the base file type and lets us have a single container to hold the types of images we need to support.
| rld::files::image::image | ( | file & | name | ) |
Construct the image.
| name | The name of the image. |
| rld::files::image::image | ( | const std::string & | path, |
| bool | is_object = true |
||
| ) |
Construct the image.
| path | The file path. |
| is_object | If true (default) the name is for an object file. |
| rld::files::image::image | ( | ) |
Construct the image.
|
virtual |
Destruct the image.
|
virtual |
Close the image.
Reimplemented in rld::files::object.
| rld::elf::file & rld::files::image::elf | ( | ) |
|
virtual |
The file descriptor.
Reimplemented in rld::files::object.
|
inline |
Is the image open ?
| true | The image is open. |
| false | The image is not open. |
|
inline |
Is the image writable ?
| true | The image is writable. |
| false | The image is not writable. |
| const file & rld::files::image::name | ( | ) | const |
The name of the image.
| const | file& The file name of the image. |
|
virtual |
Open the image. You can open the image more than once but you need to close it the same number of times.
| name | The file name. |
|
virtual |
Open the image. You can open the image more than once but you need to close it the same number of times.
| writeable | If true the image is open as writable. The default is false. |
Reimplemented in rld::files::object.
|
inline |
The path maps to the real file on disk. The file may not be valid.
|
virtual |
Read a block from the file.
| buffer | The buffer to read the data into. |
| size | The amount of data to read. |
|
virtual |
References to the image.
Reimplemented in rld::files::object.
|
virtual |
Seek to the offset in the image.
| offset | The offset to seek too. |
|
virtual |
Seek and then read.
| offset | The offset to seek too before reading. |
| buffer | The buffer to read the data into. |
| size | The amount of data to read. |
| true | The data requested was read. |
| false | The request data was not read. |
|
virtual |
Seek and then write.
| offset | The offset to seek too before writing. |
| buffer | The buffer of data to write. |
| size | The amount of data to write. |
| true | The data requested was written. |
| false | The request data was not written. |
|
virtual |
|
virtual |
A symbol in the image has been referenced.
Reimplemented in rld::files::object.
|
virtual |
Return the number of symbol references.
|
virtual |
Write a block from the file.
| buffer | The buffer of data to write. |
| size | The amount of data to write. |