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

RTEMS Run-Time Linker Object File Unresolved Relocations Table. More...

#include <errno.h>
#include <inttypes.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <rtems/rtl/rtl.h>
#include "rtl-error.h"
#include <rtems/rtl/rtl-unresolved.h>
#include <rtems/rtl/rtl-trace.h>
#include "rtl-trampoline.h"

Data Structures

struct  rtl_unresolved_name_data
 
struct  rtems_rtl_unresolved_reloc_data
 
struct  rtems_rtl_unresolved_archive_reloc_data
 
struct  rtems_rtl_unresolved_dump_data
 

Typedefs

typedef struct rtems_rtl_unresolved_reloc_data rtems_rtl_unresolved_reloc_data
 
typedef struct rtems_rtl_unresolved_archive_reloc_data rtems_rtl_unresolved_archive_reloc_data
 
typedef struct rtems_rtl_unresolved_dump_data rtems_rtl_unresolved_dump_data
 

Functions

bool rtems_rtl_unresolved_table_open (rtems_rtl_unresolved *unresolved, size_t block_recs)
 
void rtems_rtl_unresolved_table_close (rtems_rtl_unresolved *unresolved)
 
bool rtems_rtl_unresolved_iterate (rtems_rtl_unresolved_iterator iterator, void *data)
 
bool rtems_rtl_unresolved_add (rtems_rtl_obj *obj, const uint16_t flags, const char *name, const uint16_t sect, const rtems_rtl_word *rel)
 
void rtems_rtl_unresolved_resolve (void)
 
bool rtems_rtl_trampoline_add (rtems_rtl_obj *obj, const uint16_t flags, const uint16_t sect, const rtems_rtl_word symvalue, const rtems_rtl_word *rel)
 
void rtems_rtl_trampoline_remove (rtems_rtl_obj *obj)
 
void rtems_rtl_unresolved_dump (void)
 
void rtems_rtl_unresolved_set_archive_search (void)
 

Detailed Description

RTEMS Run-Time Linker Object File Unresolved Relocations Table.

Typedef Documentation

◆ rtems_rtl_unresolved_archive_reloc_data

Struct to pass archive relocation data in the iterator.

◆ rtems_rtl_unresolved_dump_data

Struct to pass relocation data in the iterator.

◆ rtems_rtl_unresolved_reloc_data

Struct to pass relocation data in the iterator.

Function Documentation

◆ rtems_rtl_trampoline_add()

bool rtems_rtl_trampoline_add ( rtems_rtl_obj obj,
const uint16_t  flags,
const uint16_t  sect,
const rtems_rtl_word  symvalue,
const rtems_rtl_word rel 
)

Add a relocation to the list of trampolinr relocations.

Parameters
objThe object table the relocation record is for.
flagsFormat specific flags.
sectThe target section number the relocation references.
symvalueThe symbol's value.
relThe format specific relocation data.
Return values
trueThe relocation has been added.
falseThe relocation could not be added.

◆ rtems_rtl_trampoline_remove()

void rtems_rtl_trampoline_remove ( rtems_rtl_obj obj)

Remove the relocation records for an object file.

Parameters
objThe object table the symbols are for.

◆ rtems_rtl_unresolved_add()

bool rtems_rtl_unresolved_add ( rtems_rtl_obj obj,
const uint16_t  flags,
const char *  name,
const uint16_t  sect,
const rtems_rtl_word rel 
)

Add a relocation to the list of unresolved relocations.

Parameters
unresolvedThe unresolved symbol table.
objThe object table the symbols are for.
flagsFormat specific flags.
nameThe symbol name the relocation references.
sectThe target section number the relocation references.
relThe format specific relocation data.
Return values
trueThe relocation has been added.
falseThe relocation could not be added.

◆ rtems_rtl_unresolved_dump()

void rtems_rtl_unresolved_dump ( void  )

Dump the RTL unresolved data.

◆ rtems_rtl_unresolved_iterate()

bool rtems_rtl_unresolved_iterate ( rtems_rtl_unresolved_iterator  iterator,
void *  data 
)

Iterate over the table of unresolved entries.

◆ rtems_rtl_unresolved_resolve()

void rtems_rtl_unresolved_resolve ( void  )

Resolve the unresolved symbols.

◆ rtems_rtl_unresolved_set_archive_search()

void rtems_rtl_unresolved_set_archive_search ( void  )

Set all symbols to be archive searchable. This is done when the available archives have been refreshed and there are new archives to search for.

◆ rtems_rtl_unresolved_table_close()

void rtems_rtl_unresolved_table_close ( rtems_rtl_unresolved unresolved)

Close the table and erase the blocks.

Parameters
unreolvedClose the unresolved table.

◆ rtems_rtl_unresolved_table_open()

bool rtems_rtl_unresolved_table_open ( rtems_rtl_unresolved unresolved,
size_t  block_records 
)

Open an unresolved relocation table.

Parameters
unresolvThe unresolved table to open.
block_recordsThe number of records per block allocated.
Return values
trueThe table is open.
falseThe unresolved relocation table could not created. The RTL error has the error.