From 044dec0bfa0f3f8f62f7703d6b0a8600c1354dc5 Mon Sep 17 00:00:00 2001 From: Yang Liu Date: Tue, 21 Jan 2025 23:13:51 +0800 Subject: [ENV] Initial refactor of env variables infrastructure (#2274) * [ENV] Initial refactor of env variables infrastructure * Ported BOX64_DYNAREC_LOG * Ported more options * Ported BOX64_MALLOC_HACK * Ported BOX64_DYNAREC_TEST * Ported more options * Ported more options * Ported more options * Ported all options * Removed old rcfile parser * Fix * review * fix * fix * more fixes --- src/elfs/elfparser.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/elfs/elfparser.c') diff --git a/src/elfs/elfparser.c b/src/elfs/elfparser.c index 618b55d0..7f88a8a6 100644 --- a/src/elfs/elfparser.c +++ b/src/elfs/elfparser.c @@ -188,14 +188,14 @@ elfheader_t* ParseElfHeader64(FILE* f, const char* name, int exec) FreeElfHeader(&h); return NULL; } - if(box64_dump) DumpMainHeader64(&header, h); + if (BOX64ENV(dump)) DumpMainHeader64(&header, h); LoadNamedSection(f, h->SHEntries._64, h->numSHEntries, h->SHStrTab, ".strtab", "SymTab Strings", SHT_STRTAB, (void**)&h->StrTab, NULL); LoadNamedSection(f, h->SHEntries._64, h->numSHEntries, h->SHStrTab, ".symtab", "SymTab", SHT_SYMTAB, (void**)&h->SymTab._64, &h->numSymTab); - if(box64_dump && h->SymTab._64) DumpSymTab64(h); + if (BOX64ENV(dump) && h->SymTab._64) DumpSymTab64(h); LoadNamedSection(f, h->SHEntries._64, h->numSHEntries, h->SHStrTab, ".dynamic", "Dynamic", SHT_DYNAMIC, (void**)&h->Dynamic._64, &h->numDynamic); - if(box64_dump && h->Dynamic._64) DumpDynamicSections64(h); + if (BOX64ENV(dump) && h->Dynamic._64) DumpDynamicSections64(h); // grab DT_REL & DT_RELA stuffs // also grab the DT_STRTAB string table { @@ -393,7 +393,7 @@ elfheader_t* ParseElfHeader64(FILE* f, const char* name, int exec) LoadNamedSection(f, h->SHEntries._64, h->numSHEntries, h->SHStrTab, ".dynstr", "DynSym Strings", SHT_STRTAB, (void**)&h->DynStr, NULL); LoadNamedSection(f, h->SHEntries._64, h->numSHEntries, h->SHStrTab, ".dynsym", "DynSym", SHT_DYNSYM, (void**)&h->DynSym, &h->numDynSym); } - + return h; } -- cgit 1.4.1