| ... | ... | @@ -790,7 +790,7 @@ pub fn populateMissingMetadata(self: *Elf) !void { |
| 790 | 790 | } |
| 791 | 791 | |
| 792 | 792 | if (self.base.options.module) |module| { |
| 793 | | if (self.zig_module_index == null) { |
| 793 | if (self.zig_module_index == null and !self.base.options.use_llvm) { |
| 794 | 794 | const index = @as(File.Index, @intCast(try self.files.addOne(gpa))); |
| 795 | 795 | self.files.set(index, .{ .zig_module = .{ |
| 796 | 796 | .index = index, |
| ... | ... | @@ -905,14 +905,15 @@ fn growSegment(self: *Elf, shndx: u16, needed_size: u64) !void { |
| 905 | 905 | const sym = self.symbol(sym_index); |
| 906 | 906 | const atom_ptr = sym.atom(self) orelse continue; |
| 907 | 907 | if (!atom_ptr.flags.alive or !atom_ptr.flags.allocated) continue; |
| 908 | | if (atom_ptr.value >= end_addr) sym.value += diff; |
| 908 | if (sym.value >= end_addr) sym.value += diff; |
| 909 | 909 | } |
| 910 | 910 | |
| 911 | 911 | for (file_ptr.globals()) |sym_index| { |
| 912 | 912 | const sym = self.symbol(sym_index); |
| 913 | if (sym.file_index != index) continue; |
| 913 | 914 | const atom_ptr = sym.atom(self) orelse continue; |
| 914 | 915 | if (!atom_ptr.flags.alive or !atom_ptr.flags.allocated) continue; |
| 915 | | if (atom_ptr.value >= end_addr) sym.value += diff; |
| 916 | if (sym.value >= end_addr) sym.value += diff; |
| 916 | 917 | } |
| 917 | 918 | |
| 918 | 919 | for (file_ptr.atoms()) |atom_index| { |