| ... | @@ -2166,7 +2166,7 @@ fn allocateAtom(self: *Elf, atom_index: Atom.Index, new_block_size: u64, alignme | ... | @@ -2166,7 +2166,7 @@ fn allocateAtom(self: *Elf, atom_index: Atom.Index, new_block_size: u64, alignme |
| 2166 | // First we look for an appropriately sized free list node. | 2166 | // First we look for an appropriately sized free list node. |
| 2167 | // The list is unordered. We'll just take the first thing that works. | 2167 | // The list is unordered. We'll just take the first thing that works. |
| 2168 | const vaddr = blk: { | 2168 | const vaddr = blk: { |
| 2169 | var i: usize = 0; | 2169 | var i: usize = if (self.base.child_pid == null) 0 else free_list.items.len; |
| 2170 | while (i < free_list.items.len) { | 2170 | while (i < free_list.items.len) { |
| 2171 | const big_atom_index = free_list.items[i]; | 2171 | const big_atom_index = free_list.items[i]; |
| 2172 | const big_atom = self.getAtom(big_atom_index); | 2172 | const big_atom = self.getAtom(big_atom_index); |
| ... | @@ -2397,7 +2397,7 @@ fn updateDeclCode(self: *Elf, decl_index: Module.Decl.Index, code: []const u8, s | ... | @@ -2397,7 +2397,7 @@ fn updateDeclCode(self: *Elf, decl_index: Module.Decl.Index, code: []const u8, s |
| 2397 | const atom = self.getAtom(atom_index); | 2397 | const atom = self.getAtom(atom_index); |
| 2398 | | 2398 | |
| 2399 | const shdr_index = decl_metadata.shdr; | 2399 | const shdr_index = decl_metadata.shdr; |
| 2400 | if (atom.getSymbol(self).st_size != 0) { | 2400 | if (atom.getSymbol(self).st_size != 0 and self.base.child_pid == null) { |
| 2401 | const local_sym = atom.getSymbolPtr(self); | 2401 | const local_sym = atom.getSymbolPtr(self); |
| 2402 | local_sym.st_name = try self.shstrtab.insert(gpa, decl_name); | 2402 | local_sym.st_name = try self.shstrtab.insert(gpa, decl_name); |
| 2403 | local_sym.st_info = (elf.STB_LOCAL << 4) | stt_bits; | 2403 | local_sym.st_info = (elf.STB_LOCAL << 4) | stt_bits; |