[lld] r239738 - COFF: Fix .reloc section attributes.
Rui Ueyama
ruiu at google.com
Mon Jun 15 11:03:47 PDT 2015
Author: ruiu
Date: Mon Jun 15 13:03:47 2015
New Revision: 239738
URL: http://llvm.org/viewvc/llvm-project?rev=239738&view=rev
Log:
COFF: Fix .reloc section attributes.
Modified:
lld/trunk/COFF/Writer.h
lld/trunk/test/COFF/baserel.test
Modified: lld/trunk/COFF/Writer.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Writer.h?rev=239738&r1=239737&r2=239738&view=diff
==============================================================================
--- lld/trunk/COFF/Writer.h (original)
+++ lld/trunk/COFF/Writer.h Mon Jun 15 13:03:47 2015
@@ -20,9 +20,9 @@
namespace lld {
namespace coff {
-// Mask for section types (code, data or bss) and permissions
-// (writable, readable or executable).
-const uint32_t PermMask = 0xF00000F0;
+// Mask for section types (code, data, bss, disacardable, etc.)
+// and permissions (writable, readable or executable).
+const uint32_t PermMask = 0xFF0000F0;
// OutputSection represents a section in an output file. It's a
// container of chunks. OutputSection and Chunk are 1:N relationship.
Modified: lld/trunk/test/COFF/baserel.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/baserel.test?rev=239738&r1=239737&r2=239738&view=diff
==============================================================================
--- lld/trunk/test/COFF/baserel.test (original)
+++ lld/trunk/test/COFF/baserel.test Mon Jun 15 13:03:47 2015
@@ -66,7 +66,8 @@ BASEREL-HEADER-NEXT: PointerToRelocation
BASEREL-HEADER-NEXT: PointerToLineNumbers: 0x0
BASEREL-HEADER-NEXT: RelocationCount: 0
BASEREL-HEADER-NEXT: LineNumberCount: 0
-BASEREL-HEADER-NEXT: Characteristics [ (0x40000040)
+BASEREL-HEADER-NEXT: Characteristics [ (0x42000040)
BASEREL-HEADER-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA (0x40)
+BASEREL-HEADER-NEXT: IMAGE_SCN_MEM_DISCARDABLE (0x2000000)
BASEREL-HEADER-NEXT: IMAGE_SCN_MEM_READ (0x40000000)
BASEREL-HEADER-NEXT: ]
More information about the llvm-commits
mailing list