~ubuntu-branches/ubuntu/trusty/emscripten/trusty-proposed

« back to all changes in this revision

Viewing changes to system/include/libc/link.h

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2014-01-19 14:12:40 UTC
  • mfrom: (1.2.4)
  • Revision ID: package-import@ubuntu.com-20140119141240-jg1l42cc158j59tn
Tags: 1.9.0~20140119~7dc8c2f-1
* New snapshot release (Closes: #733714)
* Provide sources for javascript and flash. Done in orig-tar.sh
  Available in third_party/websockify/include/web-socket-js/src/
  (Closes: #735903)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef _LINK_H
 
2
#define _LINK_H
 
3
 
 
4
#ifdef __cplusplus
 
5
extern "C" {
 
6
#endif
 
7
 
 
8
#include <elf.h>
 
9
#define __NEED_size_t
 
10
#define __NEED_uint32_t
 
11
#include <bits/alltypes.h>
 
12
 
 
13
#if UINTPTR_MAX > 0xffffffff
 
14
#define ElfW(type) Elf64_ ## type
 
15
#else
 
16
#define ElfW(type) Elf32_ ## type
 
17
#endif
 
18
 
 
19
/* this is the same everywhere except alpha and s390 */
 
20
typedef uint32_t Elf_Symndx;
 
21
 
 
22
struct dl_phdr_info {
 
23
        ElfW(Addr) dlpi_addr;
 
24
        const char *dlpi_name;
 
25
        const ElfW(Phdr) *dlpi_phdr;
 
26
        ElfW(Half) dlpi_phnum;
 
27
        unsigned long long int dlpi_adds;
 
28
        unsigned long long int dlpi_subs;
 
29
        size_t dlpi_tls_modid;
 
30
        void *dlpi_tls_data;
 
31
};
 
32
 
 
33
struct link_map {
 
34
        ElfW(Addr) l_addr;
 
35
        char *l_name;
 
36
        ElfW(Dyn) *l_ld;
 
37
        struct link_map *l_next, *l_prev;
 
38
};
 
39
 
 
40
struct r_debug {
 
41
        int r_version;
 
42
        struct link_map *r_map;
 
43
        ElfW(Addr) r_brk;
 
44
        enum { RT_CONSISTENT, RT_ADD, RT_DELETE } r_state;
 
45
        ElfW(Addr) r_ldbase;
 
46
};
 
47
 
 
48
int dl_iterate_phdr(int (*)(struct dl_phdr_info *, size_t, void *), void *);
 
49
 
 
50
#ifdef __cplusplus
 
51
}
 
52
#endif
 
53
 
 
54
#endif