Use 32 bits for alignment.

This is consistent with what we do for input sections.

llvm-svn: 297152
This commit is contained in:
Rafael Espindola
2017-03-07 15:51:09 +00:00
parent 134a572951
commit 8bb4087f88
3 changed files with 4 additions and 4 deletions

View File

@@ -65,7 +65,7 @@ void OutputSection::writeHeaderTo(typename ELFT::Shdr *Shdr) {
}
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) {

View File

@@ -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;

View File

@@ -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;