Changeset 3e828ea in mainline for uspace/lib/c/generic/dlfcn.c


Ignore:
Timestamp:
2019-09-23T12:49:29Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9be2358
Parents:
9259d20 (diff), 1a4ec93f (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Jiri Svoboda <jiri@…> (2019-09-22 12:49:07)
git-committer:
Jiri Svoboda <jiri@…> (2019-09-23 12:49:29)
Message:

Merge changes from master, especially Meson build

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/dlfcn.c

    r9259d20 r3e828ea  
    3535 */
    3636
     37#include <errno.h>
    3738#include <stdio.h>
    3839#include <stdlib.h>
     
    4445#include <rtld/module.h>
    4546#include <rtld/rtld.h>
     47#include <rtld/rtld_arch.h>
    4648#include <rtld/symbol.h>
    4749
     
    5355        if (m == NULL) {
    5456                m = module_load(runtime_env, path, mlf_local);
    55                 module_load_deps(m, mlf_local);
     57                if (m == NULL) {
     58                        return NULL;
     59                }
     60
     61                if (module_load_deps(m, mlf_local) != EOK) {
     62                        return NULL;
     63                }
     64
    5665                /* Now relocate. */
    5766                module_process_relocs(m);
     
    7180        sd = symbol_bfs_find(sym_name, (module_t *) mod, &sm);
    7281        if (sd != NULL) {
    73                 return symbol_get_addr(sd, sm, __tcb_get());
     82                if (elf_st_type(sd->st_info) == STT_FUNC)
     83                        return func_get_addr(sd, sm);
     84                else
     85                        return symbol_get_addr(sd, sm, __tcb_get());
    7486        }
    7587
Note: See TracChangeset for help on using the changeset viewer.