[llvm] r348985 - [llvm-objcopy] Change Segment::Type from uint64_t to uint32_t

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 12 14:46:37 PST 2018


Author: maskray
Date: Wed Dec 12 14:46:37 2018
New Revision: 348985

URL: http://llvm.org/viewvc/llvm-project?rev=348985&view=rev
Log:
[llvm-objcopy] Change Segment::Type from uint64_t to uint32_t

Summary:
In both Elf{32,64}_Phdr, the field Elf{32,64}_World p_type is uint32_t.

Also reorder the fields to be similar to Elf64_Phdr (which is different
from Elf32_Phdr but quite similar).

Reviewers: rupprecht, jhenderson, jakehehrlich, alexshap, espindola

Reviewed By: rupprecht

Subscribers: emaste, arichardson, llvm-commits

Differential Revision: https://reviews.llvm.org/D55618

Modified:
    llvm/trunk/tools/llvm-objcopy/ELF/Object.h

Modified: llvm/trunk/tools/llvm-objcopy/ELF/Object.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objcopy/ELF/Object.h?rev=348985&r1=348984&r2=348985&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-objcopy/ELF/Object.h (original)
+++ llvm/trunk/tools/llvm-objcopy/ELF/Object.h Wed Dec 12 14:46:37 2018
@@ -256,16 +256,16 @@ private:
   std::set<const SectionBase *, SectionCompare> Sections;
 
 public:
-  uint64_t Align;
-  uint64_t FileSize;
+  uint32_t Type;
   uint32_t Flags;
-  uint32_t Index;
-  uint64_t MemSize;
   uint64_t Offset;
-  uint64_t PAddr;
-  uint64_t Type;
   uint64_t VAddr;
+  uint64_t PAddr;
+  uint64_t FileSize;
+  uint64_t MemSize;
+  uint64_t Align;
 
+  uint32_t Index;
   uint64_t OriginalOffset;
   Segment *ParentSegment = nullptr;
   ArrayRef<uint8_t> Contents;




More information about the llvm-commits mailing list