[Scummvm-cvs-logs] SF.net SVN: scummvm:[50259] scummvm/branches/gsoc2010-plugins/backends/ platform/gp2xwiz

toneman1138 at users.sourceforge.net toneman1138 at users.sourceforge.net
Fri Jun 25 07:12:46 CEST 2010


Revision: 50259
          http://scummvm.svn.sourceforge.net/scummvm/?rev=50259&view=rev
Author:   toneman1138
Date:     2010-06-25 05:12:45 +0000 (Fri, 25 Jun 2010)

Log Message:
-----------
added ARM-specific defines to elf32.h and indented gp2xwiz-loader.h correctly

Modified Paths:
--------------
    scummvm/branches/gsoc2010-plugins/backends/platform/gp2xwiz/elf32.h
    scummvm/branches/gsoc2010-plugins/backends/platform/gp2xwiz/gp2xwiz-loader.h

Modified: scummvm/branches/gsoc2010-plugins/backends/platform/gp2xwiz/elf32.h
===================================================================
--- scummvm/branches/gsoc2010-plugins/backends/platform/gp2xwiz/elf32.h	2010-06-25 05:02:40 UTC (rev 50258)
+++ scummvm/branches/gsoc2010-plugins/backends/platform/gp2xwiz/elf32.h	2010-06-25 05:12:45 UTC (rev 50259)
@@ -89,9 +89,10 @@
 #define PT_NOTE			4	/* note segment */
 #define PT_SHLIB		5	/* reserved */
 #define PT_PHDR			6	/* Program header table */
-/* #define PT_REGINFO 0x70000000 register usage info */
+#define PT_ARM_ARCHEXT 	0x70000000 /* Platform architecture compatibility information */
+#define PT_ARM_EXIDX 	0x70000001 /* Exception unwind tables */
 
-// p_flags value (don't think these are specific to architecture, but not certain)
+// p_flags value
 #define PF_X	1	/* execute */
 #define PF_W	2	/* write */
 #define PF_R	4	/* read */
@@ -123,12 +124,14 @@
 #define SHT_REL				9	/* Relocation entries without addend */
 #define SHT_SHLIB			10	/* Reserved */
 #define SHT_DYNSYM			11	/* Minimal set of dynamic linking symbols */
+#define SHT_ARM_EXIDX 		0x70000001	/* Exception Index table */
+#define SHT_ARM_PREEMPTMAP 	0x70000002	/* BPABI DLL dynamic linking pre-emption map */
+#define SHT_ARM_ATTRIBUTES 	0x70000003	/* Object file compatibility attributes */
 
 // sh_flags values
 #define SHF_WRITE		0	/* writable section */
 #define SHF_ALLOC		2	/* section occupies memory */
 #define SHF_EXECINSTR	4	/* machine instructions */
-#define SHF_MIPS_GPREL	0x10000000	/* Must be made part of global data area */
 
 // Symbol entry (contain info about a symbol)
 typedef struct {
@@ -168,8 +171,13 @@
 typedef struct {
 	Elf32_Addr    r_offset;               /* Address */
 	Elf32_Word    r_info;                 /* Relocation type and symbol index */
-} Elf32_Rel;
+	Elf32_Sword   r_addend;               /* Addend */
+} Elf32_Rela;
 
+// Access macros for the relocation info
+#define REL_TYPE(x)		((unsigned char) (x))	/* Extract relocation type */
+#define REL_INDEX(x)	((x)>>8)				/* Extract relocation index into symbol table */
+
 // ARM relocation types
 #define R_ARM_NONE			0
 #define R_ARM_PC24			1
@@ -185,9 +193,6 @@
 #define R_ARM_THM_PC8			11
 #define R_ARM_BREL_ADJ			12
 #define R_ARM_TLS_DESC			13
-#define R_ARM_THM_SWI8 			14
-#define R_ARM_XPC25 			15
-#define R_ARM_THM_XPC22 		16
 #define R_ARM_TLS_DTPMOD32		17
 #define R_ARM_TLS_DTPOFF32		18
 #define R_ARM_TLS_TPOFF32		19
@@ -271,8 +276,6 @@
 #define R_ARM_GOT_BREL12		97
 #define R_ARM_GOTOFF12			98
 #define R_ARM_GOTRELAX			99
-#define R_ARM_GNU_VTENTRY		100
-#define R_ARM_GNU_VTINHERIT		101
 #define R_ARM_THM_JUMP11		102
 #define R_ARM_THM_JUMP8			103
 #define R_ARM_TLS_GD32			104
@@ -299,7 +302,6 @@
 #define R_ARM_PRIVATE_13		125
 #define R_ARM_PRIVATE_14		126
 #define R_ARM_PRIVATE_15		127
-#define R_ARM_ME_TOO			128
 #define R_ARM_THM_TLS_DESCSEQ16         129
 #define R_ARM_THM_TLS_DESCSEQ32 	130
 

Modified: scummvm/branches/gsoc2010-plugins/backends/platform/gp2xwiz/gp2xwiz-loader.h
===================================================================
--- scummvm/branches/gsoc2010-plugins/backends/platform/gp2xwiz/gp2xwiz-loader.h	2010-06-25 05:02:40 UTC (rev 50258)
+++ scummvm/branches/gsoc2010-plugins/backends/platform/gp2xwiz/gp2xwiz-loader.h	2010-06-25 05:12:45 UTC (rev 50259)
@@ -31,27 +31,27 @@
 #define MAXDLERRLEN 80
 
 class DLObject {
- protected:
-  char *errbuf; /* For error messages, at least MAXDLERRLEN in size */
+	protected:
+		char *errbuf; /* For error messages, at least MAXDLERRLEN in size */
 
-  void *_segment, *_symtab;
-  char *_strtab;
-  int _symbol_cnt;
-  void *_dtors_start, *_dtors_end;
+		void *_segment, *_symtab;
+		char *_strtab;
+		int _symbol_cnt;
+		void *_dtors_start, *_dtors_end;
 
-  void seterror(const char *fmt, ...);
-  void unload();
-  bool relocate(int fd, unsigned long offset, unsigned long size);
-  bool load(int fd);
+		void seterror(const char *fmt, ...);
+		void unload();
+		bool relocate(int fd, unsigned long offset, unsigned long size);
+		bool load(int fd);
 
- public:
-  bool open(const char *path);
-  bool close();
-  void *symbol(const char *name);
-  void discard_symtab();
+	public:
+		bool open(const char *path);
+		bool close();
+		void *symbol(const char *name);
+		void discard_symtab();
 
-  DLObject(char *errbuf = NULL) : errbuf(_errbuf), _segment(NULL),_symtab(NULL),
-    _strtab(NULL), _symbol_cnt(0), _dtors_start(NULL), _dtors_end(NULL) {}
+		DLObject(char *errbuf = NULL) : errbuf(_errbuf), _segment(NULL),_symtab(NULL),
+				_strtab(NULL), _symbol_cnt(0), _dtors_start(NULL), _dtors_end(NULL) {}
 };
 
 #define RTLD_LAZY 0


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list