diff options
author | Chris Johns <chrisj@rtems.org> | 2018-12-17 16:36:48 +1100 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2019-02-09 10:06:34 +1100 |
commit | 89c59be38d9c83437abb9002e8fea5012652e5ff (patch) | |
tree | 954df408c26a58ae41851502f427f30771952bdf /cpukit/libdl/rtl-shell.c | |
parent | powerpc/psim: Increase the psim memory to 256M (diff) | |
download | rtems-89c59be38d9c83437abb9002e8fea5012652e5ff.tar.bz2 |
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
Diffstat (limited to 'cpukit/libdl/rtl-shell.c')
-rw-r--r-- | cpukit/libdl/rtl-shell.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/cpukit/libdl/rtl-shell.c b/cpukit/libdl/rtl-shell.c index f3471d8d8e..c2a1af5ddd 100644 --- a/cpukit/libdl/rtl-shell.c +++ b/cpukit/libdl/rtl-shell.c @@ -26,9 +26,9 @@ #include <string.h> #include <rtems/rtl/rtl.h> -#include "rtl-chain-iterator.h" -#include "rtl-shell.h" +#include <rtems/rtl/rtl-shell.h> #include <rtems/rtl/rtl-trace.h> +#include "rtl-chain-iterator.h" /** * The type of the shell handlers we have. @@ -119,6 +119,7 @@ typedef struct { rtems_rtl_data* rtl; /**< The RTL data. */ int indent; /**< Spaces to indent. */ + bool sep1; /**< Print a separator. */ bool oname; /**< Print object names. */ bool names; /**< Print details of all names. */ bool memory_map; /**< Print the memory map. */ @@ -206,6 +207,10 @@ rtems_rtl_obj_printer (rtems_rtl_obj_print* print, rtems_rtl_obj* obj) if (!print->base && (obj == print->rtl->base)) return true; + if (print->sep1) + { + printf ("%-*c--------------\n", print->indent, ' '); + } if (print->oname) { printf ("%-*cobject name : %s\n", @@ -279,7 +284,7 @@ rtems_rtl_unresolved_printer (rtems_rtl_unresolv_rec* rec, void* data) { rtems_rtl_obj_print* print = (rtems_rtl_obj_print*) data; - if (rec->type == rtems_rtl_unresolved_name) + if (rec->type == rtems_rtl_unresolved_symbol) printf ("%-*c%s\n", print->indent + 2, ' ', rec->rec.name.name); return false; } @@ -301,6 +306,7 @@ rtems_rtl_shell_list (rtems_rtl_data* rtl, int argc, char *argv[]) rtems_rtl_obj_print print; print.rtl = rtl; print.indent = 1; + print.sep1 = true; print.oname = true; print.names = true; print.memory_map = true; @@ -319,6 +325,7 @@ rtems_rtl_shell_sym (rtems_rtl_data* rtl, int argc, char *argv[]) rtems_rtl_obj_print print; print.rtl = rtl; print.indent = 1; + print.sep1 = true; print.oname = true; print.names = false; print.memory_map = false; @@ -329,7 +336,7 @@ rtems_rtl_shell_sym (rtems_rtl_data* rtl, int argc, char *argv[]) rtems_rtl_obj_print_iterator, &print); printf ("Unresolved:\n"); - rtems_rtl_unresolved_interate (rtems_rtl_unresolved_printer, &print); + rtems_rtl_unresolved_iterate (rtems_rtl_unresolved_printer, &print); return 0; } |