1
1
mirror of https://github.com/rui314/mold.git synced 2024-11-14 07:18:42 +03:00

[Mach-O] wip

This commit is contained in:
Rui Ueyama 2021-10-13 16:50:31 +09:00
parent 0426f3d1de
commit c3e3cfaf44
2 changed files with 1 additions and 4 deletions

View File

@ -85,10 +85,6 @@ static void export_symbols(Context &ctx) {
}
static i64 assign_offsets(Context &ctx) {
for (OutputSegment *seg : ctx.segments)
for (Chunk *chunk : seg->chunks)
chunk->compute_size(ctx);
i64 fileoff = 0;
i64 vmaddr = PAGE_ZERO_SIZE;

View File

@ -277,6 +277,7 @@ void OutputSegment::set_offset(Context &ctx, i64 fileoff, u64 vmaddr) {
offset = align_to(offset, 1 << sec->hdr.p2align);
sec->hdr.addr = vmaddr + offset;
sec->hdr.offset = fileoff + offset;
sec->compute_size(ctx);
offset += sec->hdr.size;
}