RTEMS  5.1
Data Structures | Macros | Typedefs | Functions
rtl-rap.c File Reference

RTEMS Run-Time Link Editor. More...

#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <unistd.h>
#include <rtems/rtl/rtl.h>
#include "rtl-elf.h"
#include "rtl-error.h"
#include <rtems/rtl/rtl-obj-comp.h>
#include "rtl-rap.h"
#include <rtems/rtl/rtl-trace.h>
#include <rtems/rtl/rtl-unresolved.h>

Data Structures

struct  rtems_rtl_rap_sectdef
 
struct  rtems_rtl_rap_section
 
struct  rtems_rtl_rap
 

Macros

#define REL_R_OFFSET   (0)
 
#define REL_R_INFO   (1)
 
#define REL_R_ADDEND   (2)
 
#define RTEMS_RTL_RAP_TEXT_SEC   (0)
 
#define RTEMS_RTL_RAP_CONST_SEC   (1)
 
#define RTEMS_RTL_RAP_CTOR_SEC   (2)
 
#define RTEMS_RTL_RAP_DTOR_SEC   (3)
 
#define RTEMS_RTL_RAP_DATA_SEC   (4)
 
#define RTEMS_RTL_RAP_BSS_SEC   (5)
 
#define RTEMS_RTL_RAP_SECS   (6)
 
#define SYMNAME_BUFFER_SIZE   (1024)
 

Typedefs

typedef struct rtems_rtl_rap_sectdef rtems_rtl_rap_sectdef
 
typedef struct rtems_rtl_rap_section rtems_rtl_rap_section
 
typedef struct rtems_rtl_rap rtems_rtl_rap
 

Functions

bool rtems_rtl_rap_file_check (rtems_rtl_obj *obj, int fd)
 
bool rtems_rtl_rap_file_load (rtems_rtl_obj *obj, int fd)
 
bool rtems_rtl_rap_file_unload (rtems_rtl_obj *obj)
 
rtems_rtl_loader_formatrtems_rtl_rap_file_sig (void)
 

Detailed Description

RTEMS Run-Time Link Editor.

This is the RAP format loader support..

Macro Definition Documentation

◆ REL_R_OFFSET

#define REL_R_OFFSET   (0)

The offsets in the unresolved array.

◆ RTEMS_RTL_RAP_TEXT_SEC

#define RTEMS_RTL_RAP_TEXT_SEC   (0)

The section indexes. These are fixed.

Typedef Documentation

◆ rtems_rtl_rap

typedef struct rtems_rtl_rap rtems_rtl_rap

The RAP loader.

◆ rtems_rtl_rap_sectdef

The section definitions found in a RAP file.

◆ rtems_rtl_rap_section

The section definitions found in a RAP file.

Function Documentation

◆ rtems_rtl_rap_file_check()

bool rtems_rtl_rap_file_check ( rtems_rtl_obj obj,
int  fd 
)

The RAP format check handler.

Parameters
objThe object being checked.
fdThe file descriptor.

◆ rtems_rtl_rap_file_load()

bool rtems_rtl_rap_file_load ( rtems_rtl_obj obj,
int  fd 
)

The RAP format load handler.

Parameters
objThe object to load.
fdThe file descriptor.

obj->entry = (void*)(uintptr_t) ehdr.e_entry;

◆ rtems_rtl_rap_file_sig()

rtems_rtl_loader_format* rtems_rtl_rap_file_sig ( void  )

The RAP format signature handler.

Returns
rtems_rtl_loader_format* The format's signature.

◆ rtems_rtl_rap_file_unload()

bool rtems_rtl_rap_file_unload ( rtems_rtl_obj obj)

The RAP format unload handler.

Parameters
objThe object to unload.