[lld] r297152 - Use 32 bits for alignment.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 7 07:51:09 PST 2017
Author: rafael
Date: Tue Mar 7 09:51:09 2017
New Revision: 297152
URL: http://llvm.org/viewvc/llvm-project?rev=297152&view=rev
Log:
Use 32 bits for alignment.
This is consistent with what we do for input sections.
Modified:
lld/trunk/ELF/OutputSections.cpp
lld/trunk/ELF/OutputSections.h
lld/trunk/ELF/Writer.h
Modified: lld/trunk/ELF/OutputSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=297152&r1=297151&r2=297152&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.cpp (original)
+++ lld/trunk/ELF/OutputSections.cpp Tue Mar 7 09:51:09 2017
@@ -65,7 +65,7 @@ void OutputSection::writeHeaderTo(typena
}
OutputSection::OutputSection(StringRef Name, uint32_t Type, uint64_t Flags)
- : Name(Name), Alignment(1), Flags(Flags), Type(Type) {}
+ : Name(Name), Flags(Flags), Alignment(1), Type(Type) {}
template <typename ELFT>
static bool compareByFilePosition(InputSection *A, InputSection *B) {
Modified: lld/trunk/ELF/OutputSections.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.h?rev=297152&r1=297151&r2=297152&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.h (original)
+++ lld/trunk/ELF/OutputSections.h Tue Mar 7 09:51:09 2017
@@ -48,7 +48,7 @@ public:
uint32_t getPhdrFlags() const;
- void updateAlignment(uint64_t Val) {
+ void updateAlignment(uint32_t Val) {
if (Val > Alignment)
Alignment = Val;
}
@@ -70,11 +70,11 @@ public:
// The following fields correspond to Elf_Shdr members.
uint64_t Size = 0;
uint64_t Entsize = 0;
- uint64_t Alignment = 0;
uint64_t Offset = 0;
uint64_t Flags = 0;
uint64_t LMAOffset = 0;
uint64_t Addr = 0;
+ uint32_t Alignment = 0;
uint32_t ShName = 0;
uint32_t Type = 0;
uint32_t Info = 0;
Modified: lld/trunk/ELF/Writer.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.h?rev=297152&r1=297151&r2=297152&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.h (original)
+++ lld/trunk/ELF/Writer.h Tue Mar 7 09:51:09 2017
@@ -35,10 +35,10 @@ struct PhdrEntry {
uint64_t p_paddr = 0;
uint64_t p_vaddr = 0;
- uint64_t p_align = 0;
uint64_t p_memsz = 0;
uint64_t p_filesz = 0;
uint64_t p_offset = 0;
+ uint32_t p_align = 0;
uint32_t p_type = 0;
uint32_t p_flags = 0;
More information about the llvm-commits
mailing list