1
1
mirror of https://github.com/rui314/mold.git synced 2024-11-11 16:58:12 +03:00

temporary

This commit is contained in:
Rui Ueyama 2020-11-11 09:25:43 +09:00
parent a5a91f1e85
commit 2976e35b20

View File

@ -505,7 +505,8 @@ static std::vector<u8> create_phdr(ArrayRef<OutputChunk *> chunks) {
std::vector<ELF64LE::Phdr> vec;
auto define = [&](u32 type, u32 flags, u32 align, OutputChunk *chunk) {
ELF64LE::Phdr phdr = {};
vec.push_back({});
ELF64LE::Phdr &phdr = vec.back();
phdr.p_type = type;
phdr.p_flags = flags;
phdr.p_align = std::max<u64>(align, chunk->shdr.sh_addralign);
@ -513,7 +514,6 @@ static std::vector<u8> create_phdr(ArrayRef<OutputChunk *> chunks) {
phdr.p_filesz = (chunk->shdr.sh_type == SHT_NOBITS) ? 0 : chunk->shdr.sh_size;
phdr.p_vaddr = chunk->shdr.sh_addr;
phdr.p_memsz = chunk->shdr.sh_size;
vec.push_back(phdr);
if (type == PT_LOAD)
chunk->starts_new_ptload = true;