Commit Graph

20 Commits

Author SHA1 Message Date
shuhua huang
a0eecb52bc fix system fatal error caused by imperfect user input commands, e.g. "rtl sym -u" 2024-08-02 05:54:12 +00:00
Chris Johns
b9f11607b1 libdl: Realloc text memory if there are trampolines
- Add resize to the allocator interface

- Rework the trampoline variables in the obj struct
  to make better sense of what is happening

Closes #4944
2023-08-27 07:31:49 +10:00
Chris Johns
46131ce0e1 libdl: Fix warnings on 64bit architectures
Updates #4662
2022-08-05 07:54:13 +10:00
Joel Sherrill
5dec08934f cpukit/libdl: Manual file header reordering (SPDX, Doxygen, Copyright)
Updates #3053.
2022-03-22 11:34:23 -05:00
Joel Sherrill
5a65257d0c cpukit/libdl Change license to BSD-2
Updates #3053.
2022-03-22 11:34:23 -05:00
Sebastian Huber
80cf60efec Canonicalize config.h include
Use the following variant which was already used by most source files:

  #ifdef HAVE_CONFIG_H
  #include "config.h"
  #endif
2020-04-16 07:30:00 +02:00
Chris Johns
b36c52097f 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
2019-05-03 10:15:20 +10:00
Chris Johns
dad6fd4333 libdl: Add an archive command
- The archive command lists archives, symbols and any duplicate
  symbols.
- Change the RTL shell commands to the rtems_printer to allow
  the output to be captured.
2019-03-22 14:16:52 +11:00
Chris Johns
6c9f0176a9 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
2019-02-09 10:06:34 +11:00
Chris Johns
194eb403c3 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
2019-02-09 10:06:34 +11:00
Chris Johns
89c59be38d libdl: Add symbol searching and loading from archives.
- Load archive symbol tables to support searching of archives
  for symbols.
- Search archive symbols and load the object file that contains
  the symbol.
- Search the global and archives until all remaining unresolved symbols
  are not found. Group the loaded object files in the pending queue.
- Run the object file and loaded dependents as a group before adding to the
  main object list.
- Remove orphaned object files after references are removed.

Updates #3686
2019-02-09 10:06:34 +11:00
Chris Johns
03139d5b1c libdl: Add object file dependencies to track references
Tracking references lets us manage when an object file can be
unloaded. If an object file has references to it, it cannot be
unloaded.

Modules that depend on each other cannot be unloaded.

Updates #3605
2018-11-22 12:43:31 +11:00
Chris Johns
f59d435d16 libdl: Remove _t from all structures as this is reserved for the standards 2018-04-12 17:57:40 +10:00
Sebastian Huber
990adc5438 libdl: Include <rtems/rtl/rtl-*.h>
Prepare for header file move to common include directory.

Update #3254.
2017-12-13 09:04:26 +01:00
Sebastian Huber
8bdbefedd5 libdl: Fix warnings
Update #3155.
2017-10-06 09:43:17 +02:00
Joel Sherrill
54bdf0c7e5 rtems/inttypes.h: New file. Uses contents from cpukit
Provide extentions to <inttpes.h> PRIxxx constants for more POSIX types.
Start with existing definitions found in RTEMS Project owned code
in cpukit/.

updates #2983.
2017-04-18 11:24:44 -05:00
Joel Sherrill
f5201df0dc Remove M32R architecture
updates #2446.
2016-01-04 11:07:00 -06:00
Joel Sherrill
0771936eab libdl/rtl-shell.c: Adjust printf() format for off_t based on target 2015-03-24 08:17:04 -05:00
Sebastian Huber
d4edbdbcbf Replace www.rtems.com with www.rtems.org 2015-03-20 15:42:34 +01:00
Chris Johns
ae5fe7e6bc cpukit: Add libdl with the Runtime Loader (RTL) code.
This is a merge of the RTL project.
2014-10-31 11:04:15 +11:00