about summary refs log tree commit diff stats
path: root/src/librarian/librarian.c
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2022-10-19 22:59:07 +0200
committerptitSeb <sebastien.chev@gmail.com>2022-10-19 22:59:19 +0200
commitd6b9df6ca260dbada8dac68ee6857d89005a810e (patch)
treed36ec4d582307cf46056a58e2ce0696226d176af /src/librarian/librarian.c
parent4fbeca0aa3f55f3569bb3212ca130d18d20c3dc3 (diff)
downloadbox64-d6b9df6ca260dbada8dac68ee6857d89005a810e.tar.gz
box64-d6b9df6ca260dbada8dac68ee6857d89005a810e.zip
Small refactor and simplification of library_t structure and box64context_t
Diffstat (limited to 'src/librarian/librarian.c')
-rwxr-xr-xsrc/librarian/librarian.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librarian/librarian.c b/src/librarian/librarian.c
index cf5c9400..e871b68e 100755
--- a/src/librarian/librarian.c
+++ b/src/librarian/librarian.c
@@ -287,7 +287,7 @@ int AddNeededLib_add(lib_t* maplib, needed_libs_t* neededlibs, library_t* deplib
         return 1;
     }
 
-    if (lib->type == 1) {
+    if (lib->type == LIB_EMULATED) {
         // Need to add library to the linkmap (put here so the link is ordered)
         linkmap_t *lm = addLinkMapLib(lib);
         if(!lm) {
@@ -295,9 +295,9 @@ int AddNeededLib_add(lib_t* maplib, needed_libs_t* neededlibs, library_t* deplib
             printf_log(LOG_DEBUG, "Failure to add lib linkmap\n");
             return 1;
         }
-        lm->l_addr = (Elf64_Addr)GetElfDelta(my_context->elfs[lib->priv.n.elf_index]);
+        lm->l_addr = (Elf64_Addr)GetElfDelta(my_context->elfs[lib->e.elf_index]);
         lm->l_name = lib->name;
-        lm->l_ld = GetDynamicSection(my_context->elfs[lib->priv.n.elf_index]);
+        lm->l_ld = GetDynamicSection(my_context->elfs[lib->e.elf_index]);
     }
     return 0;
 }