Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygengeneric.h
Go to the documentation of this file.
00001 /*- 00002 * Copyright (c) 1998 John D. Polstra. 00003 * All rights reserved. 00004 * 00005 * Redistribution and use in source and binary forms, with or without 00006 * modification, are permitted provided that the following conditions 00007 * are met: 00008 * 1. Redistributions of source code must retain the above copyright 00009 * notice, this list of conditions and the following disclaimer. 00010 * 2. Redistributions in binary form must reproduce the above copyright 00011 * notice, this list of conditions and the following disclaimer in the 00012 * documentation and/or other materials provided with the distribution. 00013 * 00014 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 00015 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00016 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00017 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 00018 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00019 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 00020 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 00021 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 00022 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 00023 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 00024 * SUCH DAMAGE. 00025 * 00026 * $FreeBSD: src/sys/sys/elf_generic.h,v 1.6 2002/07/20 02:56:11 peter Exp $ 00027 */ 00028 00029 #ifndef _SYS_ELF_GENERIC_H_ 00030 #define _SYS_ELF_GENERIC_H_ 1 00031 00032 /* [REACTOS] TODO: we need to define this somewhere global */ 00033 #define __ELF_CONCAT1(x,y) x ## y 00034 #define __ELF_CONCAT(x,y) __ELF_CONCAT1(x,y) 00035 00036 /* 00037 * Definitions of generic ELF names which relieve applications from 00038 * needing to know the word size. 00039 */ 00040 00041 #if __ELF_WORD_SIZE != 32 && __ELF_WORD_SIZE != 64 00042 #error "__ELF_WORD_SIZE must be defined as 32 or 64" 00043 #endif 00044 00045 #define ELF_CLASS __ELF_CONCAT(ELFCLASS,__ELF_WORD_SIZE) 00046 00047 #if 0 00048 #if BYTE_ORDER == LITTLE_ENDIAN 00049 #define ELF_DATA ELFDATA2LSB 00050 #elif BYTE_ORDER == BIG_ENDIAN 00051 #define ELF_DATA ELFDATA2MSB 00052 #else 00053 #error "Unknown byte order" 00054 #endif 00055 #else 00056 /* [REACTOS] FIXME: we need to add this to our build system */ 00057 #define ELF_DATA ELFDATA2LSB 00058 #endif 00059 00060 #define __elfN(x) __ELF_CONCAT(__ELF_CONCAT(__ELF_CONCAT(elf,__ELF_WORD_SIZE),_),x) 00061 #define __ElfN(x) __ELF_CONCAT(__ELF_CONCAT(__ELF_CONCAT(Elf,__ELF_WORD_SIZE),_),x) 00062 #define __ELFN(x) __ELF_CONCAT(__ELF_CONCAT(__ELF_CONCAT(ELF,__ELF_WORD_SIZE),_),x) 00063 #define __ElfType(x) typedef __ElfN(x) __ELF_CONCAT(Elf_,x) 00064 00065 __ElfType(Addr); 00066 __ElfType(Half); 00067 __ElfType(Off); 00068 __ElfType(Sword); 00069 __ElfType(Word); 00070 __ElfType(Size); 00071 __ElfType(Hashelt); 00072 __ElfType(Ehdr); 00073 __ElfType(Shdr); 00074 __ElfType(Phdr); 00075 __ElfType(Dyn); 00076 __ElfType(Rel); 00077 __ElfType(Rela); 00078 __ElfType(Sym); 00079 00080 #define ELF_R_SYM __ELFN(R_SYM) 00081 #define ELF_R_TYPE __ELFN(R_TYPE) 00082 #define ELF_R_INFO __ELFN(R_INFO) 00083 #define ELF_ST_BIND __ELFN(ST_BIND) 00084 #define ELF_ST_TYPE __ELFN(ST_TYPE) 00085 #define ELF_ST_INFO __ELFN(ST_INFO) 00086 00087 #endif /* !_SYS_ELF_GENERIC_H_ */ Generated on Fri May 25 2012 04:31:33 for ReactOS by
1.7.6.1
|