zld: add temp debug info fix by setting mtime=0

This commit is contained in:
Jakub Konka 2021-04-22 10:51:35 +02:00
parent b03983b450
commit b00d08b667
2 changed files with 3 additions and 4 deletions

View File

@ -208,14 +208,13 @@ pub fn parseObject(self: Archive, offset: u32) !Object {
const object_name = try parseName(self.allocator, object_header, reader);
defer self.allocator.free(object_name);
const object_basename = std.fs.path.basename(object_name);
log.debug("extracting object '{s}' from archive '{s}'", .{ object_basename, self.name.? });
log.debug("extracting object '{s}' from archive '{s}'", .{ object_name, self.name.? });
const name = name: {
var buffer: [std.fs.MAX_PATH_BYTES]u8 = undefined;
const path = try std.os.realpath(self.name.?, &buffer);
break :name try std.fmt.allocPrint(self.allocator, "{s}({s})", .{ path, object_basename });
break :name try std.fmt.allocPrint(self.allocator, "{s}({s})", .{ path, object_name });
};
var object = Object.init(self.allocator);

View File

@ -2627,7 +2627,7 @@ fn writeDebugInfo(self: *Zld) !void {
.n_type = macho.N_OSO,
.n_sect = 0,
.n_desc = 1,
.n_value = tu_mtime,
.n_value = 0, //tu_mtime, TODO figure out why precalculated mtime value doesn't work
});
for (object.stabs.items) |stab| {