mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-07-01 18:39:16 +00:00
chore: Update makefiles & macros
This commit is contained in:
@ -47,7 +47,7 @@ namespace Execute
|
||||
uint64_t EntryPoint,
|
||||
uint64_t BaseAddress)
|
||||
{
|
||||
#if defined(a64)
|
||||
#if defined(__amd64__)
|
||||
char *aux_platform = (char *)vma->RequestPages(1, true); /* TODO: 4KiB is too much for this */
|
||||
strcpy(aux_platform, "x86_64");
|
||||
|
||||
@ -101,7 +101,7 @@ namespace Execute
|
||||
|
||||
void ELFObject::LoadExec_x86_64(FileNode *fd, PCB *TargetProcess)
|
||||
{
|
||||
#if defined(a64)
|
||||
#if defined(__amd64__)
|
||||
std::vector<Elf64_Phdr> PhdrINTERP = ELFGetSymbolType_x86_64(fd, PT_INTERP);
|
||||
foreach (auto Interp in PhdrINTERP)
|
||||
{
|
||||
@ -318,7 +318,7 @@ namespace Execute
|
||||
|
||||
void ELFObject::LoadDyn_x86_64(FileNode *fd, PCB *TargetProcess)
|
||||
{
|
||||
#if defined(a64)
|
||||
#if defined(__amd64__)
|
||||
std::vector<Elf64_Phdr> PhdrINTERP = ELFGetSymbolType_x86_64(fd, PT_INTERP);
|
||||
foreach (auto Interp in PhdrINTERP)
|
||||
{
|
||||
|
@ -94,7 +94,7 @@ namespace Execute
|
||||
|
||||
Elf64_Sym ELFLookupSymbol(FileNode *fd, std::string Name)
|
||||
{
|
||||
#if defined(a64)
|
||||
#if defined(__amd64__)
|
||||
Elf64_Ehdr Header{};
|
||||
fd->Read(&Header, sizeof(Elf64_Ehdr), 0);
|
||||
|
||||
@ -145,7 +145,7 @@ namespace Execute
|
||||
|
||||
uintptr_t ELFGetSymbolValue(Elf64_Ehdr *Header, uint64_t Table, uint64_t Index)
|
||||
{
|
||||
#if defined(a64)
|
||||
#if defined(__amd64__)
|
||||
if (Table == SHN_UNDEF || Index == SHN_UNDEF)
|
||||
return 0;
|
||||
Elf64_Shdr *SymbolTable = GetELFSection(Header, Table);
|
||||
@ -186,7 +186,7 @@ namespace Execute
|
||||
Elf64_Shdr *Target = GetELFSection(Header, Symbol->st_shndx);
|
||||
return (uintptr_t)Header + Symbol->st_value + Target->sh_offset;
|
||||
}
|
||||
#elif defined(a32)
|
||||
#elif defined(__i386__)
|
||||
return 0xdead;
|
||||
#endif
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ namespace Execute
|
||||
const char *Name,
|
||||
Tasking::PCB *Process)
|
||||
{
|
||||
#if defined(a64)
|
||||
#if defined(__amd64__)
|
||||
UNUSED(Name);
|
||||
debug("Relocatable");
|
||||
/* TODO: I have to fully implement this, but for now I will leave it as it is now. */
|
||||
@ -95,7 +95,7 @@ namespace Execute
|
||||
}
|
||||
}
|
||||
}
|
||||
#elif defined(a32)
|
||||
#elif defined(__i386__)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ namespace Execute
|
||||
std::vector<Elf64_Dyn> ELFGetDynamicTag_x86_64(FileNode *fd,
|
||||
DynamicArrayTags Tag)
|
||||
{
|
||||
#if defined(a64) || defined(aa64)
|
||||
#if defined(__amd64__) || defined(__aarch64__)
|
||||
std::vector<Elf64_Dyn> Ret;
|
||||
|
||||
Elf64_Ehdr ELFHeader{};
|
||||
@ -55,7 +55,7 @@ namespace Execute
|
||||
}
|
||||
|
||||
return Ret;
|
||||
#elif defined(a32)
|
||||
#elif defined(__i386__)
|
||||
return {};
|
||||
#endif
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ namespace Execute
|
||||
std::vector<Elf64_Shdr> ELFGetSections_x86_64(FileNode *fd,
|
||||
const char *SectionName)
|
||||
{
|
||||
#if defined(a64) || defined(aa64)
|
||||
#if defined(__amd64__) || defined(__aarch64__)
|
||||
std::vector<Elf64_Shdr> Ret;
|
||||
|
||||
Elf64_Ehdr ELFHeader{};
|
||||
@ -46,7 +46,7 @@ namespace Execute
|
||||
delete[] SectionHeaders;
|
||||
delete[] SectionNames;
|
||||
return Ret;
|
||||
#elif defined(a32)
|
||||
#elif defined(__i386__)
|
||||
return {};
|
||||
#endif
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ namespace Execute
|
||||
std::vector<Elf64_Phdr> ELFGetSymbolType_x86_64(FileNode *fd,
|
||||
SegmentTypes Tag)
|
||||
{
|
||||
#if defined(a64) || defined(aa64)
|
||||
#if defined(__amd64__) || defined(__aarch64__)
|
||||
std::vector<Elf64_Phdr> Ret;
|
||||
|
||||
Elf64_Ehdr ELFHeader{};
|
||||
@ -44,7 +44,7 @@ namespace Execute
|
||||
}
|
||||
|
||||
return Ret;
|
||||
#elif defined(a32)
|
||||
#elif defined(__i386__)
|
||||
return {};
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user