Skip to content

Commit 4515505

Browse files
authored
Fix reloc type produced by ilasm in PE64 images (#111212)
Fixes #111189
1 parent 043e60b commit 4515505

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/coreclr/dlls/mscorpe/pewriter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
#include "log.h"
1414

1515
static const char* const RelocName[] = {
16-
"Absolute", "Unk1", "Unk2", "HighLow", "Unk4", "MapToken",
17-
"Relative", "FilePos", "CodeRel", "Dir64", "AbsTag" };
16+
"Absolute", "Unk1", "Unk2", "HighLow", "Unk4", "MapToken",
17+
"Relative", "FilePos", "CodeRel", "Unk3", "Dir64", "AbsTag" };
1818
static const char RelocSpaces[] = " ";
1919

2020
#endif

src/coreclr/inc/corpriv.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ typedef enum {
314314

315315
// generate a .reloc for a pointer sized location,
316316
// This is transformed into BASED_HIGHLOW or BASED_DIR64 based on the platform
317-
srRelocHighLow = 3,
317+
srRelocHighLow = IMAGE_REL_BASED_HIGHLOW,
318318

319319
// generate a .reloc for the top 16-bits of a 32 bit number, where the
320320
// bottom 16 bits are included in the next word in the .reloc table
@@ -335,7 +335,7 @@ typedef enum {
335335
srRelocCodeRelative,
336336

337337
// generate a .reloc for a 64 bit address
338-
srRelocDir64,
338+
srRelocDir64 = IMAGE_REL_BASED_DIR64,
339339

340340
// generate a 30-bit section-relative reloc, used for tagged pointer values
341341
srRelocAbsoluteTagged,

0 commit comments

Comments
 (0)