From 991c9b7509772162ad5ad95b05b1688b1668df91 Mon Sep 17 00:00:00 2001 From: Jakub Konka Date: Tue, 23 Apr 2024 13:01:08 +0200 Subject: [PATCH] archive: skip special member --- src/Library.zig | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Library.zig b/src/Library.zig index 934b8eb..934543f 100644 --- a/src/Library.zig +++ b/src/Library.zig @@ -67,7 +67,8 @@ pub fn parse(self: *Library) !void { } } - if (hdr.isHybridmapMember() or hdr.isEcsymbolsMember()) continue; // TODO: what the heck are these anyhow? + // https://reviews.llvm.org/D120645 + if (hdr.isHybridmapMember() or hdr.isEcsymbolsMember() or hdr.isXfgmapMember()) continue; // TODO: what the heck are these anyhow? try self.members.append(self.gpa, .{ .offset = pos - @sizeOf(Header), @@ -279,6 +280,10 @@ const Header = extern struct { fn isEcsymbolsMember(hdr: *const Header) bool { return std.mem.eql(u8, &hdr.name, ecsymbols_member); } + + fn isXfgmapMember(hdr: *const Header) bool { + return std.mem.eql(u8, &hdr.name, xfgmap_member); + } }; const Symdef = struct { @@ -390,6 +395,7 @@ const linker_member = genMemberName("/"); const longnames_member = genMemberName("//"); const hybridmap_member = genMemberName("//"); const ecsymbols_member = genMemberName("//"); +const xfgmap_member = genMemberName("//"); const assert = std.debug.assert; const coff = std.coff;