#ifndef OBJECT_INFO_H
#define OBJECT_INFO_H
#include "segment_info.h"
#include "elf.h"
enum {OI_EXEC, OI_FILE, OI_VDSO, OI_DYNAMIC_LINKER, OI_NOT_FOUND};
struct object_info_struct {
char *name;
int type;
char *filename;
dev_t dev;
ino_t ino;
void *base_address;
void *load_address;
struct segment_info_struct *segment_table;
int segment_count;
struct dynamic_data_struct dynamic_data;
union {
const struct object_reference_struct *object_reference;
struct object_info_struct *object_info;
} *dependency_list;
int dependency_list_size;
int reference_count;
struct {
int reference_count;
} initfini_ordering;
struct object_info_struct *previous;
struct object_info_struct *next;
struct object_info_struct *initfini_previous;
struct object_info_struct *initfini_next;
};
struct object_info_list_struct {
struct object_info_struct *first;
struct object_info_struct *last;
};
void object_info_init(struct object_info_struct *object_info, const char *name, int type, ...);
void object_info_destroy(struct object_info_struct *object_info);
int object_info_equals(struct object_info_struct *object_info1, struct object_info_struct *object_info2);
void object_info_print(struct object_info_struct *object_info);
void object_info_list_init(struct object_info_list_struct *object_info_list);
void object_info_list_destroy(struct object_info_list_struct *object_info_list);
struct object_info_struct *object_info_list_insert(struct object_info_list_struct *object_info_list, const char *name, int type, ...);
#endif