Misc fixes, and I think I broke ld-acess x86_64 a while back
[tpg/acess2.git] / Usermode / Libraries / ld-acess.so_src / elf.c
index cba670e..f14205e 100644 (file)
@@ -7,7 +7,7 @@
 #include "elf32.h"
 #include "elf64.h"
 
-#define DEBUG  1
+#define DEBUG  0
 
 #if DEBUG
 # define       DEBUGS(v...)    SysDebug("ld-acess - " v)
@@ -15,9 +15,9 @@
 # define       DEBUGS(...)     
 #endif
 
-#if BITS > 32
+//#if BITS > 32
 # define SUPPORT_ELF64
-#endif
+//#endif
 
 // === CONSTANTS ===
 #if DEBUG
@@ -616,6 +616,9 @@ void *Elf64Relocate(void *Base, char **envp, const char *Filename)
                case R_X86_64_JUMP_SLOT:
                        *(uint64_t*)ptr = (uint64_t)GetSymbol(symname);
                        break;
+               case R_X86_64_RELATIVE:
+                       *(uint64_t*)ptr = (intptr_t)Base + addend;
+                       break;
                default:
                        SysDebug("ld-acess - _Elf64DoReloc: Unknown relocation type %i", type);
                        break;

UCC git Repository :: git.ucc.asn.au