Add headers for the dynamic linker interface.

These are required for libunwind to discover
the exception frame headers.
This commit is contained in:
whitequark 2015-07-26 12:53:18 +03:00
parent 7a9975ab5a
commit b5048f6cf1
3 changed files with 3361 additions and 0 deletions

View file

@ -0,0 +1,28 @@
#ifndef __DLFCN_H
#define __DLFCN_H
typedef struct
{
const char *dli_fname; /* File name of defining object. */
void *dli_fbase; /* Load address of that object. */
const char *dli_sname; /* Name of nearest symbol. */
void *dli_saddr; /* Exact value of nearest symbol. */
} Dl_info;
#ifdef __cplusplus
extern "C" {
#endif
extern int dl_iterate_phdr (int (*__callback) (struct dl_phdr_info *,
size_t, void *),
void *__data);
/* Fill in *INFO with the following information about ADDRESS.
Returns 0 iff no shared object's segments contain that address. */
extern int dladdr (const void *__address, Dl_info *__info);
#ifdef __cplusplus
}
#endif
#endif /* __DLFCN_H */

3305
software/include/dyld/elf.h Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,28 @@
#ifndef __LIMITS_H
#define __LIMITS_H
#include <stddef.h>
#include <elf.h>
#define ElfW(type) Elf32_##type
struct dl_phdr_info {
ElfW(Addr) dlpi_addr;
const char *dlpi_name;
const ElfW(Phdr) *dlpi_phdr;
ElfW(Half) dlpi_phnum;
};
#ifdef __cplusplus
extern "C" {
#endif
extern int dl_iterate_phdr (int (*__callback) (struct dl_phdr_info *,
size_t, void *),
void *__data);
#ifdef __cplusplus
}
#endif
#endif /* __LIMITS_H */