Commit Graph

7 Commits

Author SHA1 Message Date
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
7aa0530973 libdl/archive: Check for an overflow of the symbol table.
Coverty 1442636

Updates #3686
2019-02-20 09:08:38 +11:00
Chris Johns
62b01ab2d2 libdl/archive: Fix the config file string index while removing tailing white space.
Coverity issue 1442540

Updates #3686
2019-02-20 09:08:38 +11:00
Chris Johns
be62def981 libdl/archive: Return false on read failure.
Coverity issue 1442641

Updates #3686
2019-02-20 09:08:38 +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