Ignore:
Timestamp:
May 3, 2019, 12:15:20 AM (7 weeks ago)
Author:
Chris Johns <chrisj@…>
Branches:
master
Children:
8bd4f61c
Parents:
be50969
Message:

libdl: Do not access the ELF file while the allocator is locked.

  • Load symbols before allocation.
  • Parse reloc records and place any reloc recs in a cache to use while the allocator is locked.
  • Relocate symbols after section allocation.
  • Split section loading into allocation/locating and loading.
  • Update all arch back-ends with a new reloc interface to control tramp handling.
  • Add -a and -t to the object list shell command.

Closes #3741

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/include/rtems/rtl/rtl-unresolved.h

    rbe50969 rb36c5209  
    11/*
    2  *  COPYRIGHT (c) 2012, 2018 Chris Johns <chrisj@rtems.org>
     2 *  COPYRIGHT (c) 2012, 2019 Chris Johns <chrisj@rtems.org>
    33 *
    44 *  The license and distribution terms for this file may be
     
    7474  rtems_rtl_unresolved_empty = 0,  /**< The records is empty. Must always be 0 */
    7575  rtems_rtl_unresolved_symbol = 1, /**< The record is a symbol. */
    76   rtems_rtl_unresolved_reloc = 2   /**< The record is a relocation record. */
     76  rtems_rtl_unresolved_reloc = 2,  /**< The record is a relocation record. */
     77  rtems_rtl_trampoline_reloc = 3   /**< The record is a trampoline relocation record. */
    7778} rtems_rtl_unresolved_rtype;
    7879
     
    102103/**
    103104 * Unresolved externals symbols require the relocation records to be held
    104  * and references.
     105 * and referenced.
    105106 */
    106107typedef struct rtems_rtl_unresolv_reloc
     
    114115
    115116/**
     117 * Trampolines require the relocation records to be held
     118 */
     119typedef struct rtems_rtl_tramp_reloc
     120{
     121  rtems_rtl_obj* obj;      /**< The relocation's object file. */
     122  uint16_t       flags;    /**< Format specific flags. */
     123  uint16_t       sect;     /**< The target section. */
     124  rtems_rtl_word symvalue; /**< The symbol's value. */
     125  rtems_rtl_word rel[3];   /**< Relocation record. */
     126} rtems_rtl_tramp_reloc;
     127
     128/**
    116129 * Unresolved externals records.
    117130 */
     
    122135  {
    123136    rtems_rtl_unresolv_symbol name;   /**< The symbol, or */
    124     rtems_rtl_unresolv_reloc  reloc;  /**< the relocation record. */
     137    rtems_rtl_unresolv_reloc  reloc;  /**< The relocation record. */
     138    rtems_rtl_tramp_reloc     tramp;  /**< The trampoline relocation record. */
    125139  } rec;
    126140} rtems_rtl_unresolv_rec;
Note: See TracChangeset for help on using the changeset viewer.