From 620955a724f1764e3dfd40e0e481e3e3cb9bd284 Mon Sep 17 00:00:00 2001 From: Kornel Pal Date: Fri, 31 Dec 2021 20:45:28 +0100 Subject: [PATCH] PE: Fix has_oxrelocs (TLS always has oxrelocs) --- src/pefile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pefile.cpp b/src/pefile.cpp index b838b193..94934d2b 100644 --- a/src/pefile.cpp +++ b/src/pefile.cpp @@ -2485,7 +2485,7 @@ void PeFile::pack0(OutputFile *fo, ht &ih, ht &oh, getLoaderSection("UPX1HEAD",(int*)&ic); identsize += ic; - const bool has_oxrelocs = !opt->win32_pe.strip_relocs && (use_stub_relocs || tlsiv.ivnum || loadconfiv.ivnum); + const bool has_oxrelocs = !opt->win32_pe.strip_relocs && (use_stub_relocs || sotls || loadconfiv.ivnum); const bool has_ncsection = has_oxrelocs || soimpdlls || soexport || soresources; const unsigned oobjs = last_section_rsrc_only ? 4 : has_ncsection ? 3 : 2; ////pe_section_t osection[oobjs];