mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-29 12:08:48 +03:00
link/MachO: Add correct section flags (S_COALESCED, S_ATTR_NO_TOC,
S_ATTR_STRIP_STATIC_SYMS, S_ATTR_LIVE_SUPPORT) to __eh_frame section to match platform conventions
This commit is contained in:
committed by
Vadym Prodan
parent
fc517bd01c
commit
05b15e8bdb
+3
-1
@@ -1707,7 +1707,9 @@ fn initSyntheticSections(self: *MachO) !void {
|
||||
} else false;
|
||||
if (needs_eh_frame) {
|
||||
assert(needs_unwind_info);
|
||||
self.eh_frame_sect_index = try self.addSection("__TEXT", "__eh_frame", .{});
|
||||
self.eh_frame_sect_index = try self.addSection("__TEXT", "__eh_frame", .{
|
||||
.flags = macho.S_COALESCED | macho.S_ATTR_NO_TOC | macho.S_ATTR_STRIP_STATIC_SYMS | macho.S_ATTR_LIVE_SUPPORT,
|
||||
});
|
||||
}
|
||||
|
||||
if (self.getInternalObject()) |obj| {
|
||||
|
||||
@@ -289,7 +289,9 @@ fn initOutputSections(macho_file: *MachO) !void {
|
||||
} else false;
|
||||
if (needs_eh_frame) {
|
||||
assert(needs_unwind_info);
|
||||
macho_file.eh_frame_sect_index = try macho_file.addSection("__TEXT", "__eh_frame", .{});
|
||||
macho_file.eh_frame_sect_index = try macho_file.addSection("__TEXT", "__eh_frame", .{
|
||||
.flags = std.macho.S_COALESCED | std.macho.S_ATTR_NO_TOC | std.macho.S_ATTR_STRIP_STATIC_SYMS | std.macho.S_ATTR_LIVE_SUPPORT,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user