From: John Hodge Date: Mon, 17 Oct 2011 15:15:32 +0000 (+0800) Subject: Misc fixes, and I think I broke ld-acess x86_64 a while back X-Git-Tag: rel0.13~40 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=d1b2ff57c789c5d4bb1d9429582d5cbe6569e82b;p=tpg%2Facess2.git Misc fixes, and I think I broke ld-acess x86_64 a while back --- diff --git a/Modules/Display/BochsGA/bochsvbe.c b/Modules/Display/BochsGA/bochsvbe.c index 3d3132a9..05d80ed8 100644 --- a/Modules/Display/BochsGA/bochsvbe.c +++ b/Modules/Display/BochsGA/bochsvbe.c @@ -104,10 +104,10 @@ int BGA_Install(char **Arguments) version = BGA_int_ReadRegister(VBE_DISPI_INDEX_ID); LOG("version = 0x%x", version); - // NOTE: This driver was written for later than 0xB0C2 - // NOTE: Qemu is braindead and doesn't return the actual version + // NOTE: This driver was written for BGA versions >= 0xBOC2 + // NOTE: However, Qemu is braindead and doesn't return the actual version if( version != 0xB0C0 && ((version & 0xFFF0) != 0xB0C0 || version < 0xB0C2) ) { - Log_Warning("BGA", "Bochs Adapter Version is not 0xB0C4 or 0xB0C5, instead 0x%x", version); + Log_Warning("BGA", "Bochs Adapter Version is not compatible (need >= 0xB0C2), instead 0x%x", version); return MODULE_ERR_NOTNEEDED; } @@ -138,7 +138,7 @@ int BGA_Install(char **Arguments) void BGA_Uninstall(void) { DevFS_DelDevice( &gBGA_DriverStruct ); - MM_UnmapHWPages( VBE_DISPI_LFB_PHYSICAL_ADDRESS, 768 ); + MM_UnmapHWPages( (tVAddr)gBGA_Framebuffer, 768 ); } /** diff --git a/Usermode/Libraries/ld-acess.so_src/elf.c b/Usermode/Libraries/ld-acess.so_src/elf.c index cba670e7..f14205e0 100644 --- a/Usermode/Libraries/ld-acess.so_src/elf.c +++ b/Usermode/Libraries/ld-acess.so_src/elf.c @@ -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;