Esempio n. 1
0
static bool
rtems_rtl_unresolved_resolve_iterator (rtems_rtl_unresolv_rec_t* rec,
                                       void*                     data)
{
    if (rec->type == rtems_rtl_unresolved_name)
    {
        rtems_rtl_unresolved_reloc_data_t* rd;
        rd = (rtems_rtl_unresolved_reloc_data_t*) data;

        ++rd->name;

        if (rtems_rtl_trace (RTEMS_RTL_TRACE_UNRESOLVED))
            printf ("rtl: unresolv: lookup: %d: %s\n", rd->name, rec->rec.name.name);

        rd->sym = rtems_rtl_symbol_global_find (rec->rec.name.name);

        if (rd->sym)
        {
            if (rtems_rtl_trace (RTEMS_RTL_TRACE_UNRESOLVED))
                printf ("rtl: unresolv: found: %s\n", rec->rec.name.name);

            rd->name_rec = rec;

            rtems_rtl_unresolved_interate (rtems_rtl_unresolved_resolve_reloc, rd);

            rd->name_rec = NULL;
            rd->sym = NULL;
        }
    }

    return false;
}
Esempio n. 2
0
void
rtems_rtl_unresolved_resolve (void)
{
    rtems_rtl_unresolved_reloc_data_t rd;
    if (rtems_rtl_trace (RTEMS_RTL_TRACE_UNRESOLVED))
        printf ("rtl: unresolv: global resolve\n");
    rd.name = 0;
    rd.name_rec = NULL;
    rd.sym = NULL;
    rtems_rtl_unresolved_interate (rtems_rtl_unresolved_resolve_iterator, &rd);
    rtems_rtl_unresolved_compact ();
}
Esempio n. 3
0
static int
rtems_rtl_shell_sym (rtems_rtl_data_t* rtl, int argc, char *argv[])
{
    rtems_rtl_obj_print_t print;
    print.rtl = rtl;
    print.indent = 1;
    print.oname = true;
    print.names = false;
    print.memory_map = false;
    print.symbols = true;
    print.base = rtems_rtl_base_arg (argc, argv);
    rtems_rtl_chain_iterate (&rtl->objects,
                             rtems_rtl_obj_print_iterator,
                             &print);
    printf ("Unresolved:\n");
    rtems_rtl_unresolved_interate (rtems_rtl_unresolved_printer, &print);
    return 0;
}