1
1
mirror of https://github.com/rui314/mold.git synced 2024-12-28 02:44:48 +03:00

temporary

This commit is contained in:
Rui Ueyama 2020-11-10 13:56:23 +09:00
parent 9ccd3f64ad
commit ab10cda1bc

View File

@ -666,8 +666,6 @@ static u8 *open_output_file(u64 filesize) {
if (buf == MAP_FAILED)
error(config.output + ": mmap failed: " + strerror(errno));
close(fd);
memset(buf, 0, filesize);
return (u8 *)buf;
}
@ -988,6 +986,10 @@ int main(int argc, char **argv) {
{
MyTimer t("write_symtab", copy);
write_symtab(buf, files);
// Rewrite the section header gbecause write_symtab updates
// .sytmab's sh_info.
out::shdr.copy_to(buf);
}
// Fill .plt, .got, got.plt and .rela.plt sections