diff options
author | pixel <pixel> | 2004-11-27 21:44:15 +0000 |
---|---|---|
committer | pixel <pixel> | 2004-11-27 21:44:15 +0000 |
commit | 50f0dd331f8168fb5b2cd60c70178fad627b7fb6 (patch) | |
tree | 65fcec7bd507791f0db8a3af1b60ad9ac631f4a7 /includes/mipsobj.h | |
parent | f1df76865d1751469deff19e62255d50a814f183 (diff) |
Large dos2unix commit...
Diffstat (limited to 'includes/mipsobj.h')
-rw-r--r-- | includes/mipsobj.h | 148 |
1 files changed, 74 insertions, 74 deletions
diff --git a/includes/mipsobj.h b/includes/mipsobj.h index 18ac504..8ed68d8 100644 --- a/includes/mipsobj.h +++ b/includes/mipsobj.h @@ -1,74 +1,74 @@ -#ifndef __MIPSOBJ_H__ -#define __MIPSOBJ_H__ - -#include <map> -#include <Exceptions.h> -#include <Handle.h> - -enum mips_reloc_t { - R_MIPS_26, - R_MIPS_32, - R_MIPS_HI16, - R_MIPS_LO16, -}; - -enum symbol_type_t { - LOCAL, - GLOBAL, - EXTERN, -}; - -enum section_type_t { - TEXT, - DATA, - BSS, -}; - -struct reloc_t { - String symbol; - int type; - Uint32 offset; -}; - -struct symbol_t { - String name; - String section; - int type; - Uint32 offset; -}; - -class section : public Base { - public: - section(const String &, int); - section(); - virtual ~section(); - void setname(const String &); - void settype(int); - void putdatas(const Uint8 *, int); - int gettype(); - int getsize(); - const Uint8 * getdatas(); - void putreloc(const String &, int, Uint32); - void putreloc(const struct reloc_t &); - std::vector<struct reloc_t> relocs; - private: - String name; - int type; - Uint8 * datas; - int length; -}; - -class mipsobj : public Base { - public: - mipsobj(); - virtual ~mipsobj(); - std::map<String, section> sections; - std::map<String, symbol_t> symbols; - void loadELF(Handle *) throw (GeneralException); - void loadOBJ(Handle *) throw (GeneralException); - void loadLIB(Handle *, const String &) throw (GeneralException); - private: - bool loaded; -}; - -#endif +#ifndef __MIPSOBJ_H__
+#define __MIPSOBJ_H__
+
+#include <map>
+#include <Exceptions.h>
+#include <Handle.h>
+
+enum mips_reloc_t {
+ R_MIPS_26,
+ R_MIPS_32,
+ R_MIPS_HI16,
+ R_MIPS_LO16,
+};
+
+enum symbol_type_t {
+ LOCAL,
+ GLOBAL,
+ EXTERN,
+};
+
+enum section_type_t {
+ TEXT,
+ DATA,
+ BSS,
+};
+
+struct reloc_t {
+ String symbol;
+ int type;
+ Uint32 offset;
+};
+
+struct symbol_t {
+ String name;
+ String section;
+ int type;
+ Uint32 offset;
+};
+
+class section : public Base {
+ public:
+ section(const String &, int);
+ section();
+ virtual ~section();
+ void setname(const String &);
+ void settype(int);
+ void putdatas(const Uint8 *, int);
+ int gettype();
+ int getsize();
+ const Uint8 * getdatas();
+ void putreloc(const String &, int, Uint32);
+ void putreloc(const struct reloc_t &);
+ std::vector<struct reloc_t> relocs;
+ private:
+ String name;
+ int type;
+ Uint8 * datas;
+ int length;
+};
+
+class mipsobj : public Base {
+ public:
+ mipsobj();
+ virtual ~mipsobj();
+ std::map<String, section> sections;
+ std::map<String, symbol_t> symbols;
+ void loadELF(Handle *) throw (GeneralException);
+ void loadOBJ(Handle *) throw (GeneralException);
+ void loadLIB(Handle *, const String &) throw (GeneralException);
+ private:
+ bool loaded;
+};
+
+#endif
|