| ... | ... | @@ -426,7 +426,8 @@ pub fn allocateSegment(self: *Elf, opts: AllocateSegmentOpts) error{OutOfMemory} |
| 426 | 426 | const addr = blk: { |
| 427 | 427 | assert(self.phdr_table_load_index != null); |
| 428 | 428 | const phdr = &self.phdrs.items[index - 1]; |
| 429 | | break :blk mem.alignForward(u64, phdr.p_vaddr + phdr.p_memsz, opts.alignment); |
| 429 | const increased_size = padToIdeal(phdr.p_vaddr + phdr.p_memsz); |
| 430 | break :blk mem.alignForward(u64, increased_size, opts.alignment); |
| 430 | 431 | }; |
| 431 | 432 | log.debug("allocating phdr({d})({c}{c}{c}) from 0x{x} to 0x{x} (0x{x} - 0x{x})", .{ |
| 432 | 433 | index, |
| ... | ... | @@ -1186,10 +1187,6 @@ pub fn flushModule(self: *Elf, comp: *Compilation, prog_node: *std.Progress.Node |
| 1186 | 1187 | // Scan and create missing synthetic entries such as GOT indirection. |
| 1187 | 1188 | try self.scanRelocs(); |
| 1188 | 1189 | |
| 1189 | | if (build_options.enable_logging) { |
| 1190 | | state_log.debug("{}", .{self.dumpState()}); |
| 1191 | | } |
| 1192 | | |
| 1193 | 1190 | // Allocate atoms parsed from input object files, followed by allocating |
| 1194 | 1191 | // linker-defined synthetic symbols. |
| 1195 | 1192 | try self.allocateObjects(); |