mirror of
https://github.com/intel/llvm.git
synced 2026-02-03 10:39:35 +08:00
Use 32 bits for alignment.
This is consistent with what we do for input sections. llvm-svn: 297152
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user