From e44afc4aff5fa059839fb15cd1a89069eea82564 Mon Sep 17 00:00:00 2001 From: Eric Beckmann Date: Fri, 30 Jun 2017 18:16:35 +0000 Subject: Fix bug in symbol generation for resource COFF Symbols in the resource COFF file should be for .rsrc$02, where the actual resource data is, not .rsrc$01, which contains the directory tree. Differential Revision: https://reviews.llvm.org/D34832 Patch by Joe Ranieri. llvm-svn: 306853 --- llvm/lib/Object/WindowsResource.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib') diff --git a/llvm/lib/Object/WindowsResource.cpp b/llvm/lib/Object/WindowsResource.cpp index 35d5dd4ac47..539c8100716 100644 --- a/llvm/lib/Object/WindowsResource.cpp +++ b/llvm/lib/Object/WindowsResource.cpp @@ -572,7 +572,7 @@ void WindowsResourceCOFFWriter::writeSymbolTable() { Symbol = reinterpret_cast(BufferStart + CurrentOffset); strncpy(Symbol->Name.ShortName, RelocationName, (size_t)COFF::NameSize); Symbol->Value = DataOffsets[i]; - Symbol->SectionNumber = 1; + Symbol->SectionNumber = 2; Symbol->Type = COFF::IMAGE_SYM_DTYPE_NULL; Symbol->StorageClass = COFF::IMAGE_SYM_CLASS_STATIC; Symbol->NumberOfAuxSymbols = 0; -- cgit v1.2.3