macho: generate stabs last to aid in deterministic uuid calculation
This commit is contained in:
@@ -2556,12 +2556,6 @@ pub const Zld = struct {
|
||||
}
|
||||
}
|
||||
|
||||
if (!self.options.strip) {
|
||||
for (self.objects.items) |object| {
|
||||
try self.generateSymbolStabs(object, &locals);
|
||||
}
|
||||
}
|
||||
|
||||
var exports = std.ArrayList(macho.nlist_64).init(gpa);
|
||||
defer exports.deinit();
|
||||
|
||||
@@ -2592,6 +2586,14 @@ pub const Zld = struct {
|
||||
try imports_table.putNoClobber(global, new_index);
|
||||
}
|
||||
|
||||
// We generate stabs last in order to ensure that the strtab always has debug info
|
||||
// strings trailing
|
||||
if (!self.options.strip) {
|
||||
for (self.objects.items) |object| {
|
||||
try self.generateSymbolStabs(object, &locals);
|
||||
}
|
||||
}
|
||||
|
||||
const nlocals = @intCast(u32, locals.items.len);
|
||||
const nexports = @intCast(u32, exports.items.len);
|
||||
const nimports = @intCast(u32, imports.items.len);
|
||||
|
||||
Reference in New Issue
Block a user