mirror of
https://github.com/rui314/mold.git
synced 2024-09-22 18:40:59 +03:00
temporary
This commit is contained in:
parent
1081cce5b2
commit
8b5d37aabb
6
main.cc
6
main.cc
@ -303,17 +303,17 @@ int main(int argc, char **argv) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
uint64_t off = 0;
|
uint64_t off = 0;
|
||||||
|
uint32_t align = 0;
|
||||||
|
|
||||||
for (InputSection *isec : osec->chunks) {
|
for (InputSection *isec : osec->chunks) {
|
||||||
off = align_to(off, isec->shdr.sh_addralign);
|
off = align_to(off, isec->shdr.sh_addralign);
|
||||||
isec->offset = off;
|
isec->offset = off;
|
||||||
off += isec->shdr.sh_size;
|
off += isec->shdr.sh_size;
|
||||||
|
align = std::max<uint32_t>(align, isec->shdr.sh_addralign);
|
||||||
osec->shdr.sh_addralign =
|
|
||||||
std::max<uint32_t>(osec->shdr.sh_addralign, isec->shdr.sh_addralign);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
osec->shdr.sh_size = off;
|
osec->shdr.sh_size = off;
|
||||||
|
osec->shdr.sh_addralign = align;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user