#3685 assigned defect

Add large memory support to libdl

Reported by: Chris Johns Owned by: Chris Johns
Priority: normal Milestone: 5.1
Component: lib/dl Version: 5
Severity: normal Keywords:
Cc: Blocked By:


Add large memory support to libdl. Some architectures use small relative offsets with smaller instructions for performance reasons. Object files loaded at addresses that are outside the relative range require trampoline calls that bridge the instruction in the object to the target symbol. The mechanism used depends on the archives.

Libdl requires generic support to parse the relocation record before the object file allocation to provide the memory to hold the trampoline calls.

The ARM and PowerPC architectures require trampolines. This is called veneers on ARM.

Change History (5)

comment:1 Changed on Feb 8, 2019 at 11:08:11 PM by Chris Johns <chrisj@…>

In b08278e/rtems:

powerpc/psim: Increase the psim memory to 256M

This allows test dl09 to run and test PowePC backend trampoline support.

Updates #3685

comment:2 Changed on Feb 8, 2019 at 11:08:35 PM by Chris Johns <chrisj@…>

In d8c70ba6/rtems:

libdl: Add support for trampolines

  • Trampolines or fixups for veneers provide long jump support for instruciton sets that implement short relative address branches. The linker provides trampolines when creating a static image. This patch adds trampoline support to libdl and the ARM architecture.
  • The dl09 test requires enough memory so modules are outside the relative branch instruction ranges for the architecture.

Updates #3685

comment:3 Changed on Feb 8, 2019 at 11:08:38 PM by Chris Johns <chrisj@…>

In 194eb403/rtems:

libdl: Add support for large memory programs

  • Add trampolines to support relocs that are out of range on support architectures.
  • Support not loading separate text/data sections in an object file if the symbol provided in the section is a duplicate. A base image may have pulled in part of an object and another part needs to be dynamically loaded.
  • Refactor the unresolved handling to scale to hundreds of unresolved symbols when loading large number of files.

Updates #3685

comment:4 Changed on Feb 8, 2019 at 11:08:42 PM by Chris Johns <chrisj@…>

In 6c9f017/rtems:

libdl: Add powerpc large memory and small data support.

  • Add support for architecure sections that can be handled by the architecture back end.
  • Add trampoline/fixup support for PowerPC. This means the PowerPC now supports large memory loading of applications.
  • Add a bit allocator to manage small block based regions of memory.
  • Add small data (sdata/sbss) support for the PowerPC. The support makes the linker allocated small data region of memory a global resource available to libdl loaded object files.

Updates #3687
Updates #3685

comment:5 Changed on Feb 19, 2019 at 10:09:47 PM by Chris Johns <chrisj@…>

In 22afb034/rtems:

libdl/alloc: Add a locking interface to the allocator.

  • Allow an allocator to lock the allocations. This is needed to lock the heap allocator so the text and trampoline table are as close together as possible to allow for the largest possible object file size.
  • Update the default heap allocator to lock the heap allocator.
  • Update ELF loading to lock the allocator.

Updates #3685

Note: See TracTickets for help on using tickets.