RTEMS CPU Kit with SuperCore  4.11.3
Functions
rtl-mdreloc-lm32.c File Reference
#include <sys/cdefs.h>
#include <errno.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <rtems/rtl/rtl.h>
#include "rtl-elf.h"
#include "rtl-error.h"
#include "rtl-trace.h"
#include "rtl-unwind.h"
#include "rtl-unwind-dw2.h"
Include dependency graph for rtl-mdreloc-lm32.c:

Functions

uint32_t rtems_rtl_elf_section_flags (const rtems_rtl_obj_t *obj, const Elf_Shdr *shdr)
 Architecture specific handler to translate unknown section flags to RTL section flags. More...
 
bool rtems_rtl_elf_rel_resolve_sym (Elf_Word type)
 Architecture specific handler to check is a relocation record's type is required to resolve a symbol. More...
 
bool rtems_rtl_elf_relocate_rela (const rtems_rtl_obj_t *obj, const Elf_Rela *rela, const rtems_rtl_obj_sect_t *sect, const char *symname, const Elf_Byte syminfo, const Elf_Word symvalue)
 Architecture specific relocation handler compiled in for a specific architecture by the build system. More...
 
bool rtems_rtl_elf_relocate_rel (const rtems_rtl_obj_t *obj, const Elf_Rel *rel, const rtems_rtl_obj_sect_t *sect, const char *symname, const Elf_Byte syminfo, const Elf_Word symvalue)
 Architecture specific relocation handler compiled in for a specific architecture by the build system. More...
 
bool rtems_rtl_elf_unwind_parse (const rtems_rtl_obj_t *obj, const char *name, uint32_t flags)
 Architecture specific handler to check if a section contains exception handler data. More...
 
bool rtems_rtl_elf_unwind_register (rtems_rtl_obj_t *obj)
 Architecture specific handler to add an object file's unwind information to the base image. More...
 
bool rtems_rtl_elf_unwind_deregister (rtems_rtl_obj_t *obj)
 Architecture specific handler to remove an object file's unwind information from the base image. More...
 

Function Documentation

◆ rtems_rtl_elf_rel_resolve_sym()

bool rtems_rtl_elf_rel_resolve_sym ( Elf_Word  type)

Architecture specific handler to check is a relocation record's type is required to resolve a symbol.

Parameters
typeThe type field in the relocation record.
Return values
trueThe relocation record require symbol resolution.
falseThe relocation record does not require symbol resolution.

References rtems_rtl_elf_relocate_rela().

Referenced by rtems_rtl_elf_section_flags().

◆ rtems_rtl_elf_relocate_rel()

bool rtems_rtl_elf_relocate_rel ( const rtems_rtl_obj_t obj,
const Elf_Rel *  rel,
const rtems_rtl_obj_sect_t sect,
const char *  symname,
const Elf_Byte  syminfo,
const Elf_Word  symvalue 
)

Architecture specific relocation handler compiled in for a specific architecture by the build system.

The handler applies the relocation to the target.

Parameters
objThe object file being relocated.
relThe ELF relocation record.
sectThe section of the object file the relocation is for.
symnameThe symbol's name.
syminfoThe ELF symbol info field.
symvalueIf a symbol is referenced, this is the symbols value.
Return values
boolThe relocation has been applied.
boolThe relocation could not be applied.

References rtems_rtl_elf_unwind_parse(), and rtems_rtl_set_error().

◆ rtems_rtl_elf_relocate_rela()

bool rtems_rtl_elf_relocate_rela ( const rtems_rtl_obj_t obj,
const Elf_Rela *  rela,
const rtems_rtl_obj_sect_t sect,
const char *  symname,
const Elf_Byte  syminfo,
const Elf_Word  symvalue 
)

Architecture specific relocation handler compiled in for a specific architecture by the build system.

The handler applies the relocation to the target.

Parameters
objThe object file being relocated.
relaThe ELF addend relocation record.
sectThe section of the object file the relocation is for.
symnameThe symbol's name.
syminfoThe ELF symbol info field.
symvalueIf a symbol is referenced, this is the symbols value.
Return values
boolThe relocation has been applied.
boolThe relocation could not be applied.

References rtems_rtl_obj_sect_s::base.

Referenced by rtems_rtl_elf_rel_resolve_sym().

◆ rtems_rtl_elf_section_flags()

uint32_t rtems_rtl_elf_section_flags ( const rtems_rtl_obj_t obj,
const Elf_Shdr *  shdr 
)

Architecture specific handler to translate unknown section flags to RTL section flags.

Parameters
objThe object file being relocated.
shdrThe ELF section header.
Return values
0Unknown or unsupported flags.
uint32_tRTL object file flags.

References rtems_rtl_elf_rel_resolve_sym().

◆ rtems_rtl_elf_unwind_deregister()

bool rtems_rtl_elf_unwind_deregister ( rtems_rtl_obj_t obj)

Architecture specific handler to remove an object file's unwind information from the base image.

Parameters
objThe object file.
Return values
trueThe unwind information has been deregistered.
falseThe unwind information could not be deregistered.

References rtems_rtl_elf_unwind_dw2_deregister().

Referenced by rtems_rtl_elf_unwind_register().

◆ rtems_rtl_elf_unwind_parse()

bool rtems_rtl_elf_unwind_parse ( const rtems_rtl_obj_t obj,
const char *  name,
uint32_t  flags 
)

Architecture specific handler to check if a section contains exception handler data.

Parameters
objThe object file.
nameThe section's name.
uint32flags The object file's flags.
Return values
trueThe section contains unwind information.
falseThe section does not contain unwind information.

References rtems_rtl_elf_unwind_dw2_parse(), and rtems_rtl_elf_unwind_register().

Referenced by rtems_rtl_elf_relocate_rel().

◆ rtems_rtl_elf_unwind_register()

bool rtems_rtl_elf_unwind_register ( rtems_rtl_obj_t obj)

Architecture specific handler to add an object file's unwind information to the base image.

Parameters
objThe object file.
Return values
trueThe unwind information has been registered.
falseThe unwind information could not be registered.

References rtems_rtl_elf_unwind_deregister(), and rtems_rtl_elf_unwind_dw2_register().

Referenced by rtems_rtl_elf_unwind_parse().