From 0f0f747135fae5176ea28fdcd351134fa652286f Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Sun, 7 Nov 2021 12:18:55 +0900 Subject: [PATCH] [Mach-O] Fix .bss sections --- macho/input-sections.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macho/input-sections.cc b/macho/input-sections.cc index e0b7c919..ae79c878 100644 --- a/macho/input-sections.cc +++ b/macho/input-sections.cc @@ -19,7 +19,7 @@ InputSection::InputSection(Context &ctx, ObjectFile &file, const MachSection &hd Subsection *subsec = new Subsection{ .isec = *this, .input_offset = 0, - .input_size = (u32)contents.size(), + .input_size = (u32)hdr.size, .input_addr = (u32)hdr.addr, .p2align = (u8)hdr.p2align, };