Home | History | Annotate | Download | only in libabi
      1 /**
      2  * @file op_abi.h
      3  * This file contains a simple C interface to the ABI-describing functionality,
      4  * the majority of which is implemented in C++. this is the file which is
      5  * intended for use in files outside the /libabi directory.
      6  *
      7  * @remark Copyright 2002 OProfile authors
      8  * @remark Read the file COPYING
      9  *
     10  * @author Graydon Hoare
     11  * @author Philippe Elie
     12  */
     13 
     14 #ifndef OP_ABI_H
     15 #define OP_ABI_H
     16 
     17 struct op_abi_entry {
     18 	char const * name;
     19 	/// offset or size of the named entry
     20 	int offset;
     21 };
     22 
     23 #ifdef __cplusplus
     24 extern "C" {
     25 #endif
     26 
     27 /// return array is terminated by a NULL entry in name field
     28 struct op_abi_entry const * get_abi(void);
     29 
     30 /// return non zero if the abi is little endian
     31 int op_little_endian(void);
     32 
     33 /**
     34  * Write current abi to file.
     35  * return 1 on success, 0 on failure
     36  */
     37 int op_write_abi_to_file(char const * abi_file);
     38 
     39 #ifdef __cplusplus
     40 }
     41 #endif
     42 
     43 #endif // OP_ABI_H
     44