From 1a3837a96ba899e374393cf1b14a268690cd2dc1 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Wed, 8 Jan 2025 14:32:33 -0800 Subject: [PATCH 1/3] Delete dead code in ilasm PE writer --- src/coreclr/dlls/mscorpe/ceefilegenwriter.cpp | 6 +- src/coreclr/dlls/mscorpe/iceefilegen.cpp | 9 +- src/coreclr/dlls/mscorpe/pewriter.cpp | 111 +----------------- src/coreclr/inc/ceegen.h | 12 -- src/coreclr/inc/corpriv.h | 28 ----- src/coreclr/inc/pesectionman.h | 4 - src/coreclr/md/ceefilegen/pesectionman.cpp | 37 ------ 7 files changed, 7 insertions(+), 200 deletions(-) diff --git a/src/coreclr/dlls/mscorpe/ceefilegenwriter.cpp b/src/coreclr/dlls/mscorpe/ceefilegenwriter.cpp index f3fdd4186006a7..724201dd621af1 100644 --- a/src/coreclr/dlls/mscorpe/ceefilegenwriter.cpp +++ b/src/coreclr/dlls/mscorpe/ceefilegenwriter.cpp @@ -490,11 +490,7 @@ HRESULT CeeFileGenWriter::setAddrReloc(UCHAR *instrAddr, DWORD value) HRESULT CeeFileGenWriter::addAddrReloc(CeeSection &thisSection, UCHAR *instrAddr, DWORD offset, CeeSection *targetSection) { - if (!targetSection) { - thisSection.addBaseReloc(offset, srRelocHighLow); - } else { - thisSection.addSectReloc(offset, *targetSection, srRelocHighLow); - } + thisSection.addSectReloc(offset, *targetSection, srRelocHighLow); return S_OK; } // HRESULT CeeFileGenWriter::addAddrReloc() diff --git a/src/coreclr/dlls/mscorpe/iceefilegen.cpp b/src/coreclr/dlls/mscorpe/iceefilegen.cpp index 152fe9b3fcaf91..9d2df259e13dfe 100644 --- a/src/coreclr/dlls/mscorpe/iceefilegen.cpp +++ b/src/coreclr/dlls/mscorpe/iceefilegen.cpp @@ -150,14 +150,7 @@ HRESULT ICeeFileGen::AddSectionReloc (HCEESECTION section, ULONG offset, HCEESEC CeeSection *sec = reinterpret_cast(section); CeeSection *relSec = reinterpret_cast(relativeTo); - if (relSec) - { - return(sec->addSectReloc(offset, *relSec, relocType)); - } - else - { - return(sec->addBaseReloc(offset, relocType)); - } + return(sec->addSectReloc(offset, *relSec, relocType)); } HRESULT ICeeFileGen::SetOutputFileName (HCEEFILE ceeFile, _In_ LPWSTR outputFileName) diff --git a/src/coreclr/dlls/mscorpe/pewriter.cpp b/src/coreclr/dlls/mscorpe/pewriter.cpp index d060f3b7333ca1..aba676207f4c75 100644 --- a/src/coreclr/dlls/mscorpe/pewriter.cpp +++ b/src/coreclr/dlls/mscorpe/pewriter.cpp @@ -12,9 +12,7 @@ #ifdef LOGGING #include "log.h" -static const char* const RelocName[] = { - "Absolute", "Unk1", "Unk2", "HighLow", "Unk4", "MapToken", - "Relative", "FilePos", "CodeRel", "Unk3", "Dir64", "AbsTag" }; +static const char* const RelocName[] = { "Absolute", "Unk1", "Unk2", "HighLow", "MapToken", "FilePos", "Unk6", "Unk7", "Unk8", "Unk9", "Dir64" }; static const char RelocSpaces[] = " "; #endif @@ -36,18 +34,6 @@ inline static unsigned padLen(unsigned len, unsigned align) { return(roundUp(len, align) - len); } -#ifndef IMAGE_DLLCHARACTERISTICS_NO_SEH -#define IMAGE_DLLCHARACTERISTICS_NO_SEH 0x400 -#endif - -#ifndef IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE -#define IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE 0x0040 -#endif - -#ifndef IMAGE_DLLCHARACTERISTICS_NX_COMPAT -#define IMAGE_DLLCHARACTERISTICS_NX_COMPAT 0x0100 -#endif - #define COPY_AND_ADVANCE(target, src, size) { \ ::memcpy((void *) (target), (const void *) (src), (size)); \ (char *&) (target) += (size); } @@ -294,8 +280,6 @@ HRESULT PEWriterSection::applyRelocs(IMAGE_NT_HEADERS * pNtHeaders, int curType = cur->type; DWORD curOffset = cur->offset; - bool isRelocPtr = ((curType & srRelocPtr) != 0); - bool noBaseBaseReloc = ((curType & srNoBaseReloc) != 0); UINT64 targetOffset = 0; int slotNum = 0; INT64 oldStarPos; @@ -303,8 +287,6 @@ HRESULT PEWriterSection::applyRelocs(IMAGE_NT_HEADERS * pNtHeaders, // If cur->section is NULL then this is a pointer outside the module. bool externalAddress = (cur->section == NULL); - curType &= ~(srRelocPtr | srNoBaseReloc); - /* If we see any srRelocHighLow's in a PE64 file we convert them into DIR64 relocs */ if (!isPE32 && (curType == srRelocHighLow)) curType = srRelocDir64; @@ -317,58 +299,11 @@ HRESULT PEWriterSection::applyRelocs(IMAGE_NT_HEADERS * pNtHeaders, #ifdef LOGGING LOG((LF_ZAP, LL_INFO1000000, - " Reloc %s%s%s at %-7s+%04x (RVA=%08x) at" FMT_ADDR, - RelocName[curType], (isRelocPtr) ? "Ptr" : " ", + " Reloc %s%s at %-7s+%04x (RVA=%08x) at" FMT_ADDR, &RelocSpaces[strlen(RelocName[curType])], m_name, curOffset, curRVA, DBG_ADDR(pos))); -#endif - // - // 'pos' is the site of the reloc - // Compute 'targetOffset' from pointer if necessary - // - if (isRelocPtr) - { - // Calculate the value of ptr to pass to computeOffset - char * ptr = (char *) pos; - - if (curType == srRelocRelative) { - // - // Here we add sizeof(int) because we need to calculate - // ptr as the true call target address (x86 pc-rel) - // We need to true call target address since pass it - // to computeOffset and this function would fall if - // the address we pass is before the start of a section - // - oldStarPos = (SSIZE_T) ptr; - IfFailRet(AddOvf_S_S32(oldStarPos, GET_UNALIGNED_INT32(pos))); - IfFailRet(AddOvf_S_U32(oldStarPos, sizeof(int))); - ptr = (char *) oldStarPos; - targetOffset = externalAddress ? (size_t) ptr - : cur->section->computeOffset(ptr); - // We subtract off the four bytes that we added previous - // since the code below depends upon this - IfFailRet(SubOvf_U_U32(targetOffset, sizeof(int))); - IfFailRet(UnsignedFitsIn32Bits(targetOffset)); // Check for overflow - SET_UNALIGNED_VAL32(pos, targetOffset); - } - else { - ptr = (char *) GET_UNALIGNED_VALPTR(ptr); - oldStarPos = (SSIZE_T) ptr; - targetOffset = externalAddress ? (size_t) ptr - : cur->section->computeOffset(ptr); - IfFailRet(UnsignedFitsIn32Bits(targetOffset)); // Check for overflow - SET_UNALIGNED_VAL32(pos, targetOffset); - /* Zero the upper 32-bits for a machine with 64-bit pointers */ - if (!isPE32) - SET_UNALIGNED_VAL32(pos+1, 0); - } - } -#ifdef LOGGING - else - { - oldStarPos = GET_UNALIGNED_VAL32(pos); - } + oldStarPos = GET_UNALIGNED_VAL32(pos); #endif // @@ -380,14 +315,11 @@ HRESULT PEWriterSection::applyRelocs(IMAGE_NT_HEADERS * pNtHeaders, bool fNeedBrl = false; INT64 newStarPos = 0; // oldStarPos gets updated to newStarPos - if (curType == srRelocAbsolute || curType == srRelocAbsoluteTagged) { + if (curType == srRelocAbsolute) { _ASSERTE(!externalAddress); newStarPos = GET_UNALIGNED_INT32(pos); - if (curType == srRelocAbsoluteTagged) - newStarPos = (newStarPos & ~0x80000001) >> 1; - if (rdataRvaBase > 0 && ! strcmp((const char *)(cur->section->m_name), ".rdata")) IfFailRet(AddOvf_S_U32(newStarPos, rdataRvaBase)); else if (dataRvaBase > 0 && ! strcmp((const char *)(cur->section->m_name), ".data")) @@ -395,9 +327,6 @@ HRESULT PEWriterSection::applyRelocs(IMAGE_NT_HEADERS * pNtHeaders, else IfFailRet(AddOvf_S_U32(newStarPos, cur->section->m_baseRVA)); - if (curType == srRelocAbsoluteTagged) - newStarPos = (newStarPos << 1) | 0x80000001; - SET_UNALIGNED_VAL32(pos, newStarPos); } else if (curType == srRelocMapToken) @@ -416,36 +345,6 @@ HRESULT PEWriterSection::applyRelocs(IMAGE_NT_HEADERS * pNtHeaders, IfFailRet(AddOvf_S_U32(newStarPos, cur->section->m_filePos)); SET_UNALIGNED_VAL32(pos, newStarPos); } - else if (curType == srRelocRelative) - { - if (externalAddress) { -#if defined(HOST_AMD64) - newStarPos = GET_UNALIGNED_INT32(pos); -#else // x86 - UINT64 targetAddr = GET_UNALIGNED_VAL32(pos); - IfFailRet(SubOvf_U_U(newStarPos, targetAddr, imageBase)); -#endif - } - else { - newStarPos = GET_UNALIGNED_INT32(pos); - IfFailRet(AddOvf_S_U32(newStarPos, cur->section->m_baseRVA)); - } - IfFailRet(SubOvf_S_U32(newStarPos, curRVA)); - IfFailRet(SignedFitsIn31Bits(newStarPos)); // Check for overflow - SET_UNALIGNED_VAL32(pos, newStarPos); - } - else if (curType == srRelocCodeRelative) - { - newStarPos = GET_UNALIGNED_INT32(pos); - IfFailRet(SubOvf_S_U32(newStarPos, codeRvaBase)); - if (externalAddress) - IfFailRet(SubOvf_S_U(newStarPos, imageBase)); - else - IfFailRet(AddOvf_S_U32(newStarPos, cur->section->m_baseRVA)); - IfFailRet(SignedFitsIn31Bits(newStarPos)); // Check for overflow - SET_UNALIGNED_VAL32(pos, newStarPos); - - } else if (curType == srRelocHighLow) { _ASSERTE(isPE32); @@ -492,7 +391,7 @@ HRESULT PEWriterSection::applyRelocs(IMAGE_NT_HEADERS * pNtHeaders, _ASSERTE(!"Unknown Relocation type"); } - if (fBaseReloc && !noBaseBaseReloc) + if (fBaseReloc) { pBaseRelocSection->AddBaseReloc(curRVA, curType); } diff --git a/src/coreclr/inc/ceegen.h b/src/coreclr/inc/ceegen.h index f71be216c132b2..7264c28eca1778 100644 --- a/src/coreclr/inc/ceegen.h +++ b/src/coreclr/inc/ceegen.h @@ -104,10 +104,6 @@ class CeeSectionImpl { CeeSection & relativeTo, CeeSectionRelocType reloc = srRelocAbsolute, CeeSectionRelocExtra * extra = NULL) = 0; - virtual HRESULT addBaseReloc( - unsigned offset, - CeeSectionRelocType reloc = srRelocHighLow, - CeeSectionRelocExtra * extra = NULL) = 0; virtual HRESULT directoryEntry(unsigned num) = 0; virtual unsigned char * name() = 0; virtual char * computePointer(unsigned offset) const = 0; @@ -150,8 +146,6 @@ class CeeSection { // have the base of section 'relativeTo added to it HRESULT addSectReloc(unsigned offset, CeeSection& relativeTo, CeeSectionRelocType = srRelocAbsolute, CeeSectionRelocExtra *extra = 0); - // Add a base reloc for the given offset in the current section - virtual HRESULT addBaseReloc(unsigned offset, CeeSectionRelocType reloc = srRelocHighLow, CeeSectionRelocExtra *extra = 0); // this section will be directory entry 'num' @@ -319,12 +313,6 @@ inline HRESULT CeeSection::addSectReloc( return(m_impl.addSectReloc(offset, relativeTo, reloc, extra)); } -inline HRESULT CeeSection::addBaseReloc(unsigned offset, CeeSectionRelocType reloc, CeeSectionRelocExtra *extra) { - WRAPPER_NO_CONTRACT; - return(m_impl.addBaseReloc(offset, reloc, extra)); -} - - inline HRESULT CeeSection::directoryEntry(unsigned num) { WRAPPER_NO_CONTRACT; TESTANDRETURN(num < IMAGE_NUMBEROF_DIRECTORY_ENTRIES, E_INVALIDARG); diff --git a/src/coreclr/inc/corpriv.h b/src/coreclr/inc/corpriv.h index 731638549b11f2..a5755b60165687 100644 --- a/src/coreclr/inc/corpriv.h +++ b/src/coreclr/inc/corpriv.h @@ -316,49 +316,21 @@ typedef enum { // This is transformed into BASED_HIGHLOW or BASED_DIR64 based on the platform srRelocHighLow = IMAGE_REL_BASED_HIGHLOW, - // generate a .reloc for the top 16-bits of a 32 bit number, where the - // bottom 16 bits are included in the next word in the .reloc table - srRelocHighAdj, // Never Used - // generate a token map relocation, nothing into .reloc section srRelocMapToken, - // relative address fixup - srRelocRelative, - // Generate only a section-relative reloc, nothing into .reloc // section. This reloc is relative to the file position of the // section, not the section's virtual address. srRelocFilePos, - // code relative address fixup - srRelocCodeRelative, - // generate a .reloc for a 64 bit address srRelocDir64 = IMAGE_REL_BASED_DIR64, - // generate a 30-bit section-relative reloc, used for tagged pointer values - srRelocAbsoluteTagged, - - // A sentinel value to help ensure any additions to this enum are reflected // in PEWriter.cpp's RelocName array. srRelocSentinel, - // Flags that can be used with the above reloc types - - // do not emit base reloc - srNoBaseReloc = 0x4000, - - // pre-fixup contents of memory are ptr rather than a section offset - srRelocPtr = 0x8000, - - // legal enums which include the Ptr flag - srRelocAbsolutePtr = srRelocPtr + srRelocAbsolute, - srRelocHighLowPtr = srRelocPtr + srRelocHighLow, - srRelocRelativePtr = srRelocPtr + srRelocRelative, - srRelocDir64Ptr = srRelocPtr + srRelocDir64, - } CeeSectionRelocType; typedef union { diff --git a/src/coreclr/inc/pesectionman.h b/src/coreclr/inc/pesectionman.h index 79e70c7dc916dd..d74770dcd64b42 100644 --- a/src/coreclr/inc/pesectionman.h +++ b/src/coreclr/inc/pesectionman.h @@ -99,10 +99,6 @@ class PESection : public CeeSectionImpl { CeeSectionRelocType reloc = srRelocHighLow, CeeSectionRelocExtra *extra=0); - // Add a base reloc for the given offset in the current section - HRESULT addBaseReloc(unsigned offset, CeeSectionRelocType reloc = srRelocHighLow, - CeeSectionRelocExtra *extra = 0); - // section name unsigned char *name() { LIMITED_METHOD_CONTRACT; diff --git a/src/coreclr/md/ceefilegen/pesectionman.cpp b/src/coreclr/md/ceefilegen/pesectionman.cpp index cee08e25a77313..2e3df18e85b4b3 100644 --- a/src/coreclr/md/ceefilegen/pesectionman.cpp +++ b/src/coreclr/md/ceefilegen/pesectionman.cpp @@ -255,43 +255,6 @@ unsigned PESection::computeOffset(_In_ char *ptr) const // virtual return m_blobFetcher.ComputeOffset(ptr); } - -/******************************************************************/ -HRESULT PESection::addBaseReloc(unsigned offset, CeeSectionRelocType reloc, - CeeSectionRelocExtra *extra) -{ - HRESULT hr = E_FAIL; - - // Use for fixing up pointers pointing outside of the module. - // - // We only record base relocs for cross module pc-rel pointers - // - - switch (reloc) - { -#ifdef HOST_64BIT - case srRelocDir64Ptr: -#endif - case srRelocAbsolutePtr: - case srRelocHighLowPtr: - // For non pc-rel pointers we don't need to record a section reloc - hr = S_OK; - break; - -#if defined (TARGET_X86) || defined (TARGET_AMD64) - case srRelocRelativePtr: - case srRelocRelative: - hr = addSectReloc(offset, NULL, reloc, extra); - break; -#endif - - default: - _ASSERTE(!"unhandled reloc in PESection::addBaseReloc"); - break; - } - return hr; -} - /******************************************************************/ // Dynamic mem allocation, but we can't move old blocks (since others // have pointers to them), so we need a fancy way to grow From c18020f1b3ad63f64d64867f37f705f504e0bc95 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Wed, 8 Jan 2025 15:42:20 -0800 Subject: [PATCH 2/3] Fix build break --- src/coreclr/dlls/mscorpe/pewriter.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/coreclr/dlls/mscorpe/pewriter.cpp b/src/coreclr/dlls/mscorpe/pewriter.cpp index aba676207f4c75..ed5d383d0dd4f4 100644 --- a/src/coreclr/dlls/mscorpe/pewriter.cpp +++ b/src/coreclr/dlls/mscorpe/pewriter.cpp @@ -282,7 +282,9 @@ HRESULT PEWriterSection::applyRelocs(IMAGE_NT_HEADERS * pNtHeaders, DWORD curOffset = cur->offset; UINT64 targetOffset = 0; int slotNum = 0; +#ifdef LOGGING INT64 oldStarPos; +#endif // If cur->section is NULL then this is a pointer outside the module. bool externalAddress = (cur->section == NULL); From 018a2849bc4a8c3b262ac8caa40713794b42e3f6 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Wed, 8 Jan 2025 16:39:56 -0800 Subject: [PATCH 3/3] Delete magic enum values --- src/coreclr/dlls/mscorpe/pewriter.cpp | 80 +++++++++------------------ src/coreclr/inc/corpriv.h | 5 +- 2 files changed, 27 insertions(+), 58 deletions(-) diff --git a/src/coreclr/dlls/mscorpe/pewriter.cpp b/src/coreclr/dlls/mscorpe/pewriter.cpp index ed5d383d0dd4f4..f33c02460115d3 100644 --- a/src/coreclr/dlls/mscorpe/pewriter.cpp +++ b/src/coreclr/dlls/mscorpe/pewriter.cpp @@ -12,7 +12,7 @@ #ifdef LOGGING #include "log.h" -static const char* const RelocName[] = { "Absolute", "Unk1", "Unk2", "HighLow", "MapToken", "FilePos", "Unk6", "Unk7", "Unk8", "Unk9", "Dir64" }; +static const char* const RelocName[] = { "Absolute", "HighLow", "MapToken", "FilePos" }; static const char RelocSpaces[] = " "; #endif @@ -286,13 +286,6 @@ HRESULT PEWriterSection::applyRelocs(IMAGE_NT_HEADERS * pNtHeaders, INT64 oldStarPos; #endif - // If cur->section is NULL then this is a pointer outside the module. - bool externalAddress = (cur->section == NULL); - - /* If we see any srRelocHighLow's in a PE64 file we convert them into DIR64 relocs */ - if (!isPE32 && (curType == srRelocHighLow)) - curType = srRelocDir64; - DWORD curRVA = m_baseRVA; // RVA in the PE image of the reloc site IfFailRet(AddOvf_RVA(curRVA, curOffset)); DWORD UNALIGNED * pos = (DWORD *) m_blobFetcher.ComputePointer(curOffset); @@ -313,12 +306,10 @@ HRESULT PEWriterSection::applyRelocs(IMAGE_NT_HEADERS * pNtHeaders, // Record base relocs as necessary. // - bool fBaseReloc = false; - bool fNeedBrl = false; + int baseReloc = 0; INT64 newStarPos = 0; // oldStarPos gets updated to newStarPos if (curType == srRelocAbsolute) { - _ASSERTE(!externalAddress); newStarPos = GET_UNALIGNED_INT32(pos); @@ -342,80 +333,61 @@ HRESULT PEWriterSection::applyRelocs(IMAGE_NT_HEADERS * pNtHeaders, } else if (curType == srRelocFilePos) { - _ASSERTE(!externalAddress); newStarPos = GET_UNALIGNED_VAL32(pos); IfFailRet(AddOvf_S_U32(newStarPos, cur->section->m_filePos)); SET_UNALIGNED_VAL32(pos, newStarPos); } else if (curType == srRelocHighLow) { - _ASSERTE(isPE32); - - // we have a 32-bit value at pos - UINT64 value = GET_UNALIGNED_VAL32(pos); - - if (!externalAddress) + if (isPE32) { + // we have a 32-bit value at pos + UINT64 value = GET_UNALIGNED_VAL32(pos); + IfFailRet(AddOvf_U_U32(value, cur->section->m_baseRVA)); IfFailRet(AddOvf_U_U(value, imageBase)); - } - IfFailRet(UnsignedFitsIn32Bits(value)); // Check for overflow - SET_UNALIGNED_VAL32(pos, value); + IfFailRet(UnsignedFitsIn32Bits(value)); // Check for overflow + SET_UNALIGNED_VAL32(pos, value); - newStarPos = value; + newStarPos = value; - fBaseReloc = true; - } - else if (curType == srRelocDir64) - { - _ASSERTE(!isPE32); - - // we have a 64-bit value at pos - UINT64 UNALIGNED * p_value = (UINT64 *) pos; - targetOffset = *p_value; - - if (!externalAddress) + baseReloc = IMAGE_REL_BASED_HIGHLOW; + } + else { + // we have a 64-bit value at pos + UINT64 UNALIGNED * p_value = (UINT64 *) pos; + targetOffset = *p_value; + // The upper bits of targetOffset must be zero IfFailRet(UnsignedFitsIn32Bits(targetOffset)); IfFailRet(AddOvf_U_U32(targetOffset, cur->section->m_baseRVA)); IfFailRet(AddOvf_U_U(targetOffset, imageBase)); - } - *p_value = targetOffset; - newStarPos = targetOffset; - fBaseReloc = true; + *p_value = targetOffset; + newStarPos = targetOffset; + + baseReloc = IMAGE_REL_BASED_DIR64; + } } else { _ASSERTE(!"Unknown Relocation type"); } - if (fBaseReloc) + if (baseReloc != 0) { - pBaseRelocSection->AddBaseReloc(curRVA, curType); + pBaseRelocSection->AddBaseReloc(curRVA, baseReloc); } #ifdef LOGGING - const char* sectionName; - - if (externalAddress) - { - sectionName = "external"; - } - else - { - sectionName = cur->section->m_name; - } - LOG((LF_ZAP, LL_INFO1000000, - "to %-7s+%04x, old =" FMT_ADDR "new =" FMT_ADDR "%s%s\n", - sectionName, targetOffset, + "to %-7s+%04x, old =" FMT_ADDR "new =" FMT_ADDR "%s\n", + cur->section->m_name, targetOffset, DBG_ADDR(oldStarPos), DBG_ADDR(newStarPos), - fBaseReloc ? "(BASE RELOC)" : "", - fNeedBrl ? "(BRL)" : "" )); + baseReloc ? "(BASE RELOC)" : "")); #endif } diff --git a/src/coreclr/inc/corpriv.h b/src/coreclr/inc/corpriv.h index a5755b60165687..ee4c149d29a790 100644 --- a/src/coreclr/inc/corpriv.h +++ b/src/coreclr/inc/corpriv.h @@ -314,7 +314,7 @@ typedef enum { // generate a .reloc for a pointer sized location, // This is transformed into BASED_HIGHLOW or BASED_DIR64 based on the platform - srRelocHighLow = IMAGE_REL_BASED_HIGHLOW, + srRelocHighLow, // generate a token map relocation, nothing into .reloc section srRelocMapToken, @@ -324,9 +324,6 @@ typedef enum { // section, not the section's virtual address. srRelocFilePos, - // generate a .reloc for a 64 bit address - srRelocDir64 = IMAGE_REL_BASED_DIR64, - // A sentinel value to help ensure any additions to this enum are reflected // in PEWriter.cpp's RelocName array. srRelocSentinel,