Changeset f570cdf in mainline for uspace/lib/c/include


Ignore:
Timestamp:
2016-05-24T15:32:57Z (10 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c170438
Parents:
dcc150cb (diff), 0a981e3 (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.
Message:

Merge with mainline

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

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/elf/elf_mod.h

    rdcc150cb rf570cdf  
    5858} eld_flags_t;
    5959
     60/** TLS info for a module */
     61typedef struct {
     62        /** tdata section image */
     63        void *tdata;
     64        /** Size of tdata section image in bytes */
     65        size_t tdata_size;
     66        /** Size of tbss section */
     67        size_t tbss_size;
     68        /** Alignment of TLS initialization image */
     69        size_t tls_align;
     70} elf_tls_info_t;
     71
    6072/**
    6173 * Some data extracted from the headers are stored here
     
    7082        /** Pointer to the dynamic section */
    7183        void *dynamic;
     84
     85        /** TLS info */
     86        elf_tls_info_t tls;
    7287} elf_finfo_t;
    7388
  • uspace/lib/c/include/rtld/module.h

    rdcc150cb rf570cdf  
    4242#include <types/rtld/rtld.h>
    4343
     44extern int module_create_static_exec(rtld_t *, module_t **);
    4445extern void module_process_relocs(module_t *);
    4546extern module_t *module_find(rtld_t *, const char *);
    4647extern module_t *module_load(rtld_t *, const char *, mlflags_t);
    4748extern void module_load_deps(module_t *, mlflags_t);
     49extern module_t *module_by_id(rtld_t *, unsigned long);
    4850
    4951extern void modules_process_relocs(rtld_t *, module_t *);
     52extern void modules_process_tls(rtld_t *);
    5053extern void modules_untag(rtld_t *);
    5154
  • uspace/lib/c/include/rtld/rtld.h

    rdcc150cb rf570cdf  
    4141
    4242#include <rtld/dynamic.h>
     43#include <tls.h>
    4344#include <types/rtld/rtld.h>
    4445
    4546extern rtld_t *runtime_env;
    4647
    47 extern void rtld_init_static(void);
     48extern int rtld_init_static(void);
    4849extern int rtld_prog_process(elf_finfo_t *, rtld_t **);
     50extern tcb_t *rtld_tls_make(rtld_t *);
     51extern unsigned long rtld_get_next_id(rtld_t *);
     52extern void *rtld_tls_get_addr(rtld_t *, tcb_t *, unsigned long, unsigned long);
    4953
    5054#endif
  • uspace/lib/c/include/rtld/symbol.h

    rdcc150cb rf570cdf  
    3838#include <elf/elf.h>
    3939#include <rtld/rtld.h>
     40#include <tls.h>
    4041
    4142/** Symbol search flags */
     
    5051extern elf_symbol_t *symbol_def_find(const char *, module_t *,
    5152    symbol_search_flags_t, module_t **);
    52 extern void *symbol_get_addr(elf_symbol_t *, module_t *);
     53extern void *symbol_get_addr(elf_symbol_t *, module_t *, tcb_t *);
    5354
    5455#endif
  • uspace/lib/c/include/tls.h

    rdcc150cb rf570cdf  
    3939#include <sys/types.h>
    4040
     41/** DTV Generation number - equals vector length */
     42#define DTV_GN(dtv) (((uintptr_t *)(dtv))[0])
     43
    4144/*
    4245 * Symbols defined in the respective linker script.
     
    5255extern void tls_free(tcb_t *);
    5356extern void tls_free_arch(tcb_t *, size_t);
     57extern size_t tls_get_size(void);
     58extern void *tls_get(void);
    5459
    5560#ifdef CONFIG_TLS_VARIANT_1
  • uspace/lib/c/include/types/rtld/module.h

    rdcc150cb rf570cdf  
    4646/** Dynamically linked module */
    4747typedef struct module {
     48        /** Module ID */
     49        unsigned long id;
     50        /** Dynamic info for this module */
    4851        dyn_info_t dyn;
     52        /** Load bias */
    4953        size_t bias;
     54
     55        /** tdata image start */
     56        void *tdata;
     57        /** tdata image size */
     58        size_t tdata_size;
     59        /** tbss size */
     60        size_t tbss_size;
     61        /** TLS alignment */
     62        size_t tls_align;
     63
     64        size_t ioffs;
    5065
    5166        /** Containing rtld */
     
    6176        /** Link to list of all modules in runtime environment */
    6277        link_t modules_link;
     78        /** Link to list of initial modules */
     79        link_t imodules_link;
    6380
    6481        /** Link to BFS queue. Only used when doing a BFS of the module graph */
  • uspace/lib/c/include/types/rtld/rtld.h

    rdcc150cb rf570cdf  
    4848        module_t *program;
    4949
     50        /** Next module ID */
     51        unsigned long next_id;
     52
     53        /** Size of initial TLS tdata + tbss */
     54        size_t tls_size;
     55
    5056        /** List of all loaded modules including rtld and the program */
    5157        list_t modules;
     58
     59        /** List of initial modules */
     60        list_t imodules;
    5261
    5362        /** Temporary hack to place each module at different address. */
Note: See TracChangeset for help on using the changeset viewer.