[llvm] 3fa43da - [llvm] Fix a copy-pasto
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 23 12:34:08 PDT 2021
Author: Nico Weber
Date: 2021-09-23T15:34:01-04:00
New Revision: 3fa43da7a3b46169b731dfca2bf3d41e85d3769d
URL: https://github.com/llvm/llvm-project/commit/3fa43da7a3b46169b731dfca2bf3d41e85d3769d
DIFF: https://github.com/llvm/llvm-project/commit/3fa43da7a3b46169b731dfca2bf3d41e85d3769d.diff
LOG: [llvm] Fix a copy-pasto
We should use IMAGE_REL_I386_SECREL in the i386 section of this file.
IMAGE_REL_I386_SECREL and IMAGE_REL_AMD64_SECREL have the same
numeric value 0xB, so this doesn't change behavior.
Added:
Modified:
llvm/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp b/llvm/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp
index 075e85f4e243..10fc176b59d8 100644
--- a/llvm/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp
+++ b/llvm/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp
@@ -100,7 +100,7 @@ unsigned X86WinCOFFObjectWriter::getRelocType(MCContext &Ctx,
if (Modifier == MCSymbolRefExpr::VK_COFF_IMGREL32)
return COFF::IMAGE_REL_I386_DIR32NB;
if (Modifier == MCSymbolRefExpr::VK_SECREL)
- return COFF::IMAGE_REL_AMD64_SECREL;
+ return COFF::IMAGE_REL_I386_SECREL;
return COFF::IMAGE_REL_I386_DIR32;
case FK_SecRel_2:
return COFF::IMAGE_REL_I386_SECTION;
More information about the llvm-commits
mailing list