Changeset a6dffb8 in mainline for uspace/lib


Ignore:
Timestamp:
2011-04-28T18:56:01Z (15 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b40a3b6
Parents:
b678410
Message:

Fold dynamic loading functionality into loader. This eliminates dload binary
and the extra loading stage.

Location:
uspace/lib/c/rtld
Files:
7 edited
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/rtld/arch/ia32/src/reloc.c

    rb678410 ra6dffb8  
    4141#include <symbol.h>
    4242#include <rtld.h>
     43#include <rtld_debug.h>
    4344
    4445#include <rtld_arch.h>
  • uspace/lib/c/rtld/arch/mips32/src/reloc.c

    rb678410 ra6dffb8  
    4141#include <symbol.h>
    4242#include <rtld.h>
     43#include <rtld_debug.h>
    4344
    4445#include <rtld_arch.h>
  • uspace/lib/c/rtld/arch/ppc32/src/reloc.c

    rb678410 ra6dffb8  
    4141#include <symbol.h>
    4242#include <rtld.h>
     43#include <rtld_debug.h>
    4344#include <smc.h>
    4445
  • uspace/lib/c/rtld/dynamic.c

    rb678410 ra6dffb8  
    4141#include <dynamic.h>
    4242#include <rtld.h>
     43#include <rtld_debug.h>
    4344
    4445void dynamic_parse(elf_dyn_t *dyn_ptr, size_t bias, dyn_info_t *info)
  • uspace/lib/c/rtld/include/rtld.h

    rb678410 ra6dffb8  
    4242#include <module.h>
    4343
    44 /* Define to enable debugging mode. */
    45 #undef RTLD_DEBUG
    46 
    47 #ifdef RTLD_DEBUG
    48         #define DPRINTF(format, ...) printf(format, ##__VA_ARGS__)
    49 #else
    50         #define DPRINTF(format, ...) if (0) printf(format, ##__VA_ARGS__)
    51 #endif
    52 
    5344typedef struct {
    5445        elf_dyn_t *rtld_dynamic;
  • uspace/lib/c/rtld/include/rtld_debug.h

    rb678410 ra6dffb8  
    2727 */
    2828
    29 /** @addtogroup init
     29/** @addtogroup generic
    3030 * @{
    3131 */
    32 /**
    33  * @file
     32/** @file
    3433 */
    3534
    36 #ifndef _DLOAD_START_H
    37 #define _DLOAD_START_H
     35#ifndef RTLD_DEBUG_H_
     36#define RTLD_DEBUG_H_
    3837
    39 void program_run(void *entry, pcb_t *pcb);
     38#include <sys/types.h>
     39#include <adt/list.h>
     40
     41#include <dynamic.h>
     42#include <module.h>
     43
     44/* Define to enable debugging mode. */
     45#undef RTLD_DEBUG
     46
     47#ifdef RTLD_DEBUG
     48        #define DPRINTF(format, ...) printf(format, ##__VA_ARGS__)
     49#else
     50        #define DPRINTF(format, ...) if (0) printf(format, ##__VA_ARGS__)
     51#endif
    4052
    4153#endif
  • uspace/lib/c/rtld/module.c

    rb678410 ra6dffb8  
    4343
    4444#include <rtld.h>
     45#include <rtld_debug.h>
    4546#include <dynamic.h>
    4647#include <elf_load.h>
     
    9798        module_t *m;
    9899        const char *p, *soname;
     100
     101        DPRINTF("module_find('%s')\n", name);
    99102
    100103        /*
     
    107110
    108111        /* Traverse list of all modules. Not extremely fast, but simple */
     112        DPRINTF("head = %p\n", head);
    109113        for (cur = head->next; cur != head; cur = cur->next) {
     114                DPRINTF("cur = %p\n", cur);
    110115                m = list_get_instance(cur, module_t, modules_link);
    111116                if (str_cmp(m->dyn.soname, soname) == 0) {
     
    185190        module_t *dm;
    186191        size_t n, i;
     192
     193        DPRINTF("module_load_deps('%s')\n", m->dyn.soname);
    187194
    188195        /* Count direct dependencies */
  • uspace/lib/c/rtld/symbol.c

    rb678410 ra6dffb8  
    4040
    4141#include <rtld.h>
     42#include <rtld_debug.h>
    4243#include <symbol.h>
    4344#include <elf.h>
Note: See TracChangeset for help on using the changeset viewer.