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:
parent
0426f3d1de
commit
c3e3cfaf44
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user