RTEMS Linker  0.0.1
RTEMS Tools Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
/Users/chris/Development/rtems/src/apps/rtl-host.chrisj/rld-files.cpp File Reference
#include <algorithm>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include <rld.h>

Namespaces

namespace  rld
 
namespace  rld::files
 

Macros

#define CREATE_MODE   (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH)
 
#define OPEN_FLAGS   (0)
 
#define COPY_FILE_BUFFER_SIZE   (8 * 1024)
 
#define rld_archive_ident   "!<arch>\n"
 
#define rld_archive_ident_size   (sizeof (rld_archive_ident) - 1)
 
#define rld_archive_fhdr_base   rld_archive_ident_size
 
#define rld_archive_fname   (0)
 
#define rld_archive_fname_size   (16)
 
#define rld_archive_mtime   (16)
 
#define rld_archive_mtime_size   (12)
 
#define rld_archive_uid   (28)
 
#define rld_archive_uid_size   (6)
 
#define rld_archive_gid   (34)
 
#define rld_archive_gid_size   (6)
 
#define rld_archive_mode   (40)
 
#define rld_archive_mode_size   (8)
 
#define rld_archive_size   (48)
 
#define rld_archive_size_size   (10)
 
#define rld_archive_magic   (58)
 
#define rld_archive_magic_size   (2)
 
#define rld_archive_fhdr_size   (60)
 
#define rld_archive_max_file_size   (1024)
 

Functions

uint64_t rld::files::scan_decimal (const uint8_t *string, size_t len)
 
void rld::files::set_number (uint32_t value, uint8_t *string, size_t len, bool octal=false)
 
std::string rld::files::basename (const std::string &name)
 
std::string rld::files::dirname (const std::string &name)
 
std::string rld::files::extension (const std::string &name)
 
void rld::files::path_split (const std::string &path, rld::files::paths &paths)
 
void rld::files::path_join (const std::string &path_, const std::string &file_, std::string &joined)
 
bool rld::files::check_file (const std::string &path)
 
bool rld::files::check_directory (const std::string &path)
 
void rld::files::find_file (std::string &path, const std::string &name, paths &search_paths)
 
void rld::files::copy_file (image &in, image &out, size_t size)
 
size_t rld::files::sum_sizes (const sections &secs)
 
const section * rld::files::find (const sections &secs, const int index)
 
void rld::files::find_libraries (paths &libraries, paths &libpaths, paths &libs)
 

Macro Definition Documentation

#define COPY_FILE_BUFFER_SIZE   (8 * 1024)
#define CREATE_MODE   (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH)
#define OPEN_FLAGS   (0)
#define rld_archive_fhdr_base   rld_archive_ident_size
#define rld_archive_fhdr_size   (60)
#define rld_archive_fname   (0)
#define rld_archive_fname_size   (16)
#define rld_archive_gid   (34)
#define rld_archive_gid_size   (6)
#define rld_archive_ident   "!<arch>\n"

Defines for the header of an archive.

#define rld_archive_ident_size   (sizeof (rld_archive_ident) - 1)
#define rld_archive_magic   (58)
#define rld_archive_magic_size   (2)
#define rld_archive_max_file_size   (1024)
#define rld_archive_mode   (40)
#define rld_archive_mode_size   (8)
#define rld_archive_mtime   (16)
#define rld_archive_mtime_size   (12)
#define rld_archive_size   (48)
#define rld_archive_size_size   (10)
#define rld_archive_uid   (28)
#define rld_archive_uid_size   (6)