From 74e4694f7b1b9651da3e75b5e3394895574ebace Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Thu, 22 Oct 2020 20:40:23 +0900 Subject: [PATCH] temporary --- main.cc | 2 +- mold.h | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/main.cc b/main.cc index a74c1dae..a1288173 100644 --- a/main.cc +++ b/main.cc @@ -152,7 +152,7 @@ static std::vector create_phdrs() { static std::vector create_shdrs(ArrayRef output_chunks) { - static ELF64LE::Shdr null_entry; + static ELF64LE::Shdr null_entry = {}; std::vector vec; vec.push_back(&null_entry); diff --git a/mold.h b/mold.h index aa7eaf50..674eac19 100644 --- a/mold.h +++ b/mold.h @@ -256,7 +256,7 @@ public: } uint64_t get_size() const override { - return hdr.size() * sizeof(hdr[0]); + return hdr.size() * sizeof(ELF64LE::Phdr[0]); } std::vector hdr; @@ -291,9 +291,6 @@ public: std::vector chunks; static std::vector all_instances; - -private: - uint64_t file_offset = 0; }; class InterpSection : public OutputChunk {