about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2022-01-05 21:04:13 +0100
committerptitSeb <sebastien.chev@gmail.com>2022-01-05 21:04:13 +0100
commit97a1da81af3903c030f0b7287579b6680148b8b3 (patch)
tree7ced3ffdcc34f1f328675e2eb820fcf2e0d7310c /src
parent55e888074de17aeae4d0173a10d317db83d88ced (diff)
downloadbox64-97a1da81af3903c030f0b7287579b6680148b8b3.tar.gz
box64-97a1da81af3903c030f0b7287579b6680148b8b3.zip
Added a warning if launching a binary with a preinit array
Diffstat (limited to 'src')
-rwxr-xr-xsrc/elfs/elfparser.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/elfs/elfparser.c b/src/elfs/elfparser.c
index 453e507e..07599df6 100755
--- a/src/elfs/elfparser.c
+++ b/src/elfs/elfparser.c
@@ -246,6 +246,10 @@ elfheader_t* ParseElfHeader(FILE* f, const char* name, int exec)
                     h->initarray_sz = val / sizeof(Elf64_Addr);
                     printf_log(LOG_DEBUG, "The DT_INIT_ARRAYSZ is %zu\n", h->initarray_sz);
                     break;
+                case DT_PREINIT_ARRAYSZ:
+                    if(val)
+                        printf_log(LOG_NONE, "Warning, PreInit Array (size=%d) present and ignored!\n", val);
+                    break;
                 case DT_FINI: // Exit hook
                     h->finientry = ptr;
                     printf_log(LOG_DEBUG, "The DT_FINI is at address %p\n", (void*)h->finientry);