00001
00002 #include "conv-config.h"
00003
00004 #if CMK_HAS_ELF_H && CMK_HAS_TLS_VARIABLES
00005
00006 #include <elf.h>
00007 #include <string.h>
00008 #include <stdlib.h>
00009 #if CMK_HAS_MALLOC_H
00010 #include <malloc.h>
00011 #endif
00012
00013 #if ( defined(__LP64__) || defined(_LP64) )
00014 #define ELF64
00015 #else
00016 #define ELF32
00017 #endif
00018
00019 #ifdef ELF32
00020 typedef Elf32_Addr Addr;
00021 typedef Elf32_Ehdr Ehdr;
00022 typedef Elf32_Phdr Phdr;
00023 #else
00024 typedef Elf64_Addr Addr;
00025 typedef Elf64_Ehdr Ehdr;
00026 typedef Elf64_Phdr Phdr;
00027 #endif
00028
00029 typedef struct {
00030 Addr memseg;
00031 size_t size;
00032 size_t align;
00033 } tlsseg_t;
00034
00035
00036 #endif